Skip to content

Commit

Permalink
Merge pull request #44278 from jsamudio/fix_AlpakaPFLogic_14_0
Browse files Browse the repository at this point in the history
[14_0_X] Fix logic in PFClusterSoAProducer kernels
  • Loading branch information
cmsbuild authored Mar 1, 2024
2 parents 4177026 + 768c0d5 commit b9bd7bb
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1380,17 +1380,17 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
clusterView[seedIdx].y() = pfRecHits[rhIdx].y();
clusterView[seedIdx].z() = pfRecHits[rhIdx].z();
}
} else if constexpr (!std::is_same_v<Device, alpaka::DevCpu>) {
// singleSeed and multiSeedParallel functions work only for GPU backend
if (nSeeds == 1) {
// Single seed cluster
hcalFastCluster_singleSeed(
acc, pfClusParams, topology, topoId, nRHTopo, pfRecHits, pfClusteringVars, clusterView, fracView);
} else if (nSeeds <= 100 && nRHTopo - nSeeds < threadsPerBlockForClustering) {
hcalFastCluster_multiSeedParallel(
acc, pfClusParams, topology, topoId, nSeeds, nRHTopo, pfRecHits, pfClusteringVars, clusterView, fracView);
}
} else if ((not std::is_same_v<Device, alpaka::DevCpu>)&&nSeeds == 1) {
// Single seed cluster
hcalFastCluster_singleSeed(
acc, pfClusParams, topology, topoId, nRHTopo, pfRecHits, pfClusteringVars, clusterView, fracView);
} else if ((not std::is_same_v<Device, alpaka::DevCpu>)&&nSeeds <= 100 &&
nRHTopo - nSeeds < threadsPerBlockForClustering) {
hcalFastCluster_multiSeedParallel(
acc, pfClusParams, topology, topoId, nSeeds, nRHTopo, pfRecHits, pfClusteringVars, clusterView, fracView);
} else if (nSeeds <= 400 && nRHTopo - nSeeds <= 1500) {
// nSeeds value must match exotic in FastClusterExotic
hcalFastCluster_multiSeedIterative(
acc, pfClusParams, topology, topoId, nSeeds, nRHTopo, pfRecHits, pfClusteringVars, clusterView, fracView);
} else {
Expand Down Expand Up @@ -1429,7 +1429,8 @@ namespace ALPAKA_ACCELERATOR_NAMESPACE {
int nRHTopo = pfClusteringVars[topoId].topoRHCount();
int nSeeds = pfClusteringVars[topoId].topoSeedCount();

if (nRHTopo > 0 && nSeeds > 400 && nRHTopo - nSeeds > 1500) {
// nSeeds value must match multiSeedIterative in FastCluster
if (nRHTopo > 0 && (nSeeds > 400 || nRHTopo - nSeeds > 1500)) {
hcalFastCluster_exotic(acc,
pfClusParams,
topology,
Expand Down

0 comments on commit b9bd7bb

Please sign in to comment.