Skip to content

Commit 61bbcaf

Browse files
committed
GPU TPC: Don't fail in ZS decoding if there was only trigger/etc input but no ZS data
1 parent 180ce1e commit 61bbcaf

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

GPU/GPUTracking/Global/GPUChainTrackingClusterizer.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ int GPUChainTracking::RunTPCClusterizer_prepare(bool restorePointers)
355355
}
356356
mCFContext->fragmentFirst = CfFragment{std::max<int>(mCFContext->tpcMaxTimeBin + 1, TPC_MAX_FRAGMENT_LEN), TPC_MAX_FRAGMENT_LEN};
357357
for (int iSlice = 0; iSlice < GetProcessingSettings().nTPCClustererLanes && iSlice < NSLICES; iSlice++) {
358-
if (mIOPtrs.tpcZS && mCFContext->nPagesSector[iSlice]) {
358+
if (mIOPtrs.tpcZS && mCFContext->nPagesSector[iSlice] && mCFContext->zsVersion != -1) {
359359
mCFContext->nextPos[iSlice] = RunTPCClusterizer_transferZS(iSlice, mCFContext->fragmentFirst, GetProcessingSettings().nTPCClustererLanes + iSlice);
360360
}
361361
}
@@ -492,7 +492,7 @@ int GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)
492492
}
493493

494494
if (mIOPtrs.tpcZS) {
495-
if (mCFContext->nPagesSector[iSlice]) {
495+
if (mCFContext->nPagesSector[iSlice] && mCFContext->zsVersion != -1) {
496496
clusterer.mPmemory->counters.nPositions = mCFContext->nextPos[iSlice].first;
497497
clusterer.mPmemory->counters.nPagesSubslice = mCFContext->nextPos[iSlice].second;
498498
} else {
@@ -510,14 +510,14 @@ int GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)
510510
}
511511
DoDebugAndDump(RecoStep::TPCClusterFinding, 0, clusterer, &GPUTPCClusterFinder::DumpChargeMap, *mDebugFile, "Zeroed Charges");
512512

513-
if (mIOPtrs.tpcZS && mCFContext->nPagesSector[iSlice]) {
513+
if (mIOPtrs.tpcZS && mCFContext->nPagesSector[iSlice] && mCFContext->zsVersion != -1) {
514514
TransferMemoryResourceLinkToGPU(RecoStep::TPCClusterFinding, mInputsHost->mResourceZS, lane);
515515
SynchronizeStream(GetProcessingSettings().nTPCClustererLanes + lane);
516516
}
517517

518518
SynchronizeStream(mRec->NStreams() - 1); // Wait for copying to constant memory
519519

520-
if (mIOPtrs.tpcZS && !mCFContext->nPagesSector[iSlice]) {
520+
if (mIOPtrs.tpcZS && (!mCFContext->nPagesSector[iSlice] || mCFContext->zsVersion == -1)) {
521521
continue;
522522
}
523523

@@ -559,7 +559,7 @@ int GPUChainTracking::RunTPCClusterizer(bool synchronizeOutput)
559559
nextSlice += GetProcessingSettings().nTPCClustererLanes;
560560
f = mCFContext->fragmentFirst;
561561
}
562-
if (nextSlice < NSLICES && mIOPtrs.tpcZS && mCFContext->nPagesSector[nextSlice]) {
562+
if (nextSlice < NSLICES && mIOPtrs.tpcZS && mCFContext->nPagesSector[nextSlice] && mCFContext->zsVersion != -1) {
563563
mCFContext->nextPos[nextSlice] = RunTPCClusterizer_transferZS(nextSlice, f, GetProcessingSettings().nTPCClustererLanes + lane);
564564
}
565565
}

GPU/GPUTracking/Global/GPUChainTrackingMerger.cxx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,6 @@ int GPUChainTracking::RunTPCTrackingMerger(bool synchronizeOutput)
226226
}
227227
if (doGPU && !doGPUall) {
228228
TransferMemoryResourcesToHost(RecoStep::TPCMerging, &Merger, 0);
229-
GPUError("foo1");
230229
SynchronizeStream(0);
231230
}
232231

@@ -274,7 +273,6 @@ int GPUChainTracking::RunTPCTrackingMerger(bool synchronizeOutput)
274273
}
275274
if (GetProcessingSettings().keepDisplayMemory && !GetProcessingSettings().keepAllMemory) {
276275
TransferMemoryResourcesToHost(RecoStep::TPCMerging, &Merger, -1, true);
277-
GPUError("foo2");
278276
}
279277

280278
mRec->ReturnVolatileDeviceMemory();
@@ -307,7 +305,6 @@ int GPUChainTracking::RunTPCTrackingMerger(bool synchronizeOutput)
307305
if (GetProcessingSettings().runMC && mIOPtrs.clustersNative && mIOPtrs.clustersNative->clustersMCTruth) {
308306
AllocateRegisteredMemory(Merger.MemoryResOutputO2MC(), mSubOutputControls[GPUTrackingOutputs::getIndex(&GPUTrackingOutputs::tpcTracksO2Labels)]);
309307
TransferMemoryResourcesToHost(RecoStep::TPCMerging, &Merger, -1, true);
310-
GPUError("foo3");
311308
runKernel<GPUTPCGMO2Output, GPUTPCGMO2Output::mc>(GetGridAuto(0, GPUReconstruction::krnlDeviceType::CPU), krnlRunRangeNone, krnlEventNone);
312309
} else if (doGPUall) {
313310
RecordMarker(&mEvents->single, 0);

0 commit comments

Comments
 (0)