Skip to content

Commit

Permalink
Fix logic in FastCluster kernels
Browse files Browse the repository at this point in the history
Add non-seed rechit condition in exotic clustering
  • Loading branch information
jsamudio committed Feb 29, 2024
1 parent 1816fe8 commit 768c0d5
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 768c0d5

Please sign in to comment.