Skip to content
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
10 changes: 8 additions & 2 deletions GPU/GPUTracking/Global/GPUChainTrackingClusterizer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1197,15 +1197,17 @@ int32_t GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)
GPUTPCClusterFinder& clusterer = processors()->tpcClusterer[iSector];
GPUTPCClusterFinder& clustererShadow = doGPU ? processorsShadow()->tpcClusterer[iSector] : clusterer;

if (clusterer.mPmemory->counters.nPositions == 0) {
const bool resetClusterCounters = fragment.index == 0;
// The reset must also run for an empty first fragment since later fragments can contain data.
if (clusterer.mPmemory->counters.nPositions == 0 && !resetClusterCounters) {
return;
}

if (doGPU) {
SynchronizeStream(lane);
}

if (fragment.index == 0) {
if (resetClusterCounters) {
deviceEvent* waitEvent = nullptr;
if (transferRunning[lane] == 1) {
waitEvent = &mEvents->stream[lane];
Expand All @@ -1214,6 +1216,10 @@ int32_t GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)
runKernel<GPUMemClean16>({GetGridAutoStep(lane, RecoStep::TPCClusterFinding), krnlRunRangeNone, {nullptr, waitEvent}}, clustererShadow.mPclusterInRow, GPUTPCGeometry::NROWS * sizeof(*clustererShadow.mPclusterInRow));
}

if (clusterer.mPmemory->counters.nPositions == 0) {
return;
}

const auto nRegularClusters = clusterer.mPmemory->counters.nClusters;
if (nRegularClusters != 0) {
if (GetProcessingSettings().nn.applyNNclusterizer) {
Expand Down