Skip to content

Commit 97df43f

Browse files
committed
GPU: Clear error codes after printing
1 parent 2d25773 commit 97df43f

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

GPU/GPUTracking/Global/GPUChainTracking.cxx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -864,17 +864,18 @@ int GPUChainTracking::CheckErrorCodes(bool cpuOnly, bool forceShowErrors)
864864
}
865865
}
866866
}
867+
ClearErrorCodes(cpuOnly);
867868
return retVal;
868869
}
869870

870-
void GPUChainTracking::ClearErrorCodes()
871+
void GPUChainTracking::ClearErrorCodes(bool cpuOnly)
871872
{
872873
processors()->errorCodes.clear();
873-
const auto& threadContext = GetThreadContext();
874-
if (mRec->IsGPU()) {
874+
if (mRec->IsGPU() && !cpuOnly) {
875+
const auto& threadContext = GetThreadContext();
875876
WriteToConstantMemory(RecoStep::NoRecoStep, (char*)&processors()->errorCodes - (char*)processors(), &processorsShadow()->errorCodes, sizeof(processorsShadow()->errorCodes), 0);
877+
TransferMemoryResourceLinkToGPU(RecoStep::NoRecoStep, mInputsHost->mResourceErrorCodes, 0);
876878
}
877-
TransferMemoryResourceLinkToGPU(RecoStep::NoRecoStep, mInputsHost->mResourceErrorCodes, 0);
878879
}
879880

880881
void GPUChainTracking::SetDefaultInternalO2Propagator(bool useGPUField)

GPU/GPUTracking/Global/GPUChainTracking.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class GPUChainTracking : public GPUChain, GPUReconstructionHelpers::helperDelega
8181
int CheckErrorCodes(bool cpuOnly = false, bool forceShowErrors = false) override;
8282
bool SupportsDoublePipeline() override { return true; }
8383
int FinalizePipelinedProcessing() override;
84-
void ClearErrorCodes();
84+
void ClearErrorCodes(bool cpuOnly = false);
8585
void DoQueuedCalibUpdates(int stream); // Forces doing queue calib updates, don't call when you are not sure you are allowed to do so!
8686

8787
// Structures for input and output data

0 commit comments

Comments
 (0)