Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14_0_X] Fix logic in PFClusterSoAProducer kernels #44278

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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