Skip to content

Commit 4728f06

Browse files
committed
GPU Clusterizer: Fix should not release an unused event
1 parent 37adc60 commit 4728f06

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

GPU/GPUTracking/Global/GPUChainTrackingClusterizer.cxx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,8 +865,12 @@ int32_t GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)
865865
}
866866

867867
if (fragment.index == 0) {
868-
runKernel<GPUMemClean16>({GetGridAutoStep(lane, RecoStep::TPCClusterFinding), krnlRunRangeNone, {nullptr, transferRunning[lane] == 1 ? &mEvents->stream[lane] : nullptr}}, clustererShadow.mPclusterInRow, GPUCA_ROW_COUNT * sizeof(*clustererShadow.mPclusterInRow));
869-
transferRunning[lane] = 2;
868+
deviceEvent* waitEvent = nullptr;
869+
if (transferRunning[lane] == 1) {
870+
waitEvent = &mEvents->stream[lane];
871+
transferRunning[lane] = 2;
872+
}
873+
runKernel<GPUMemClean16>({GetGridAutoStep(lane, RecoStep::TPCClusterFinding), krnlRunRangeNone, {nullptr, waitEvent}}, clustererShadow.mPclusterInRow, GPUCA_ROW_COUNT * sizeof(*clustererShadow.mPclusterInRow));
870874
}
871875

872876
if (clusterer.mPmemory->counters.nClusters == 0) {

0 commit comments

Comments
 (0)