Skip to content

Commit ccb2619

Browse files
authored
GPU TPC: Fix filtering check (#14032)
1 parent 622bcca commit ccb2619

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

GPU/GPUTracking/Global/GPUChainTrackingCompression.cxx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,14 @@ int32_t GPUChainTracking::RunTPCCompression()
201201

202202
int32_t GPUChainTracking::RunTPCDecompression()
203203
{
204-
const bool runFullFiltering = GetProcessingSettings().tpcApplyCFCutsAtDecoding || (GetProcessingSettings().tpcApplyClusterFilterOnCPU > 0) || (param().tpcCutTimeBin > 0);
205-
if (runFullFiltering && !GetProcessingSettings().tpcUseOldCPUDecoding) {
204+
const bool needFullFiltering = GetProcessingSettings().tpcApplyCFCutsAtDecoding || (GetProcessingSettings().tpcApplyClusterFilterOnCPU > 0);
205+
const bool runTimeBinCutFiltering = param().tpcCutTimeBin > 0;
206+
if (needFullFiltering && !GetProcessingSettings().tpcUseOldCPUDecoding) {
206207
GPUFatal("tpcApplyCFCutsAtDecoding, tpcApplyClusterFilterOnCPU and tpcCutTimeBin currently require tpcUseOldCPUDecoding");
207208
}
208209

209210
if (GetProcessingSettings().tpcUseOldCPUDecoding) {
211+
const bool runFiltering = needFullFiltering || runTimeBinCutFiltering;
210212
const auto& threadContext = GetThreadContext();
211213
TPCClusterDecompressor decomp;
212214
auto allocatorFinal = [this](size_t size) {
@@ -219,13 +221,13 @@ int32_t GPUChainTracking::RunTPCDecompression()
219221
return ((tmpBuffer = std::make_unique<ClusterNative[]>(size))).get();
220222
};
221223
auto& decompressTimer = getTimer<TPCClusterDecompressor>("TPCDecompression", 0);
222-
auto allocatorUse = runFullFiltering ? std::function<ClusterNative*(size_t)>{allocatorTmp} : std::function<ClusterNative*(size_t)>{allocatorFinal};
224+
auto allocatorUse = runFiltering ? std::function<ClusterNative*(size_t)>{allocatorTmp} : std::function<ClusterNative*(size_t)>{allocatorFinal};
223225
decompressTimer.Start();
224226
if (decomp.decompress(mIOPtrs.tpcCompressedClusters, *mClusterNativeAccess, allocatorUse, param(), GetProcessingSettings().deterministicGPUReconstruction)) {
225227
GPUError("Error decompressing clusters");
226228
return 1;
227229
}
228-
if (runFullFiltering) {
230+
if (runFiltering) {
229231
RunTPCClusterFilter(mClusterNativeAccess.get(), allocatorFinal, GetProcessingSettings().tpcApplyCFCutsAtDecoding);
230232
}
231233
decompressTimer.Stop();
@@ -245,7 +247,6 @@ int32_t GPUChainTracking::RunTPCDecompression()
245247
mRec->PushNonPersistentMemory(qStr2Tag("TPCDCMPR"));
246248
RecoStep myStep = RecoStep::TPCDecompression;
247249
bool doGPU = GetRecoStepsGPU() & RecoStep::TPCDecompression;
248-
bool runTimeBinCutFiltering = param().tpcCutTimeBin > 0;
249250
GPUTPCDecompression& Decompressor = processors()->tpcDecompressor;
250251
GPUTPCDecompression& DecompressorShadow = doGPU ? processorsShadow()->tpcDecompressor : Decompressor;
251252
const auto& threadContext = GetThreadContext();

0 commit comments

Comments
 (0)