Skip to content

Commit 435b17b

Browse files
committed
GPU TPC: Add option to clear all non-external-output TPC memory at end of processing
1 parent 9070674 commit 435b17b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

GPU/GPUTracking/Base/GPUReconstructionCPU.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ int32_t GPUReconstructionCPU::RunChains()
236236
return retVal;
237237
}
238238
}
239+
if (GetProcessingSettings().tpcFreeAllocatedMemoryAfterProcessing) {
240+
ClearAllocatedMemory();
241+
}
239242
}
240243
mTimerTotal.Stop();
241244
mStatCPUTime += (double)(std::clock() - cpuTimerStart) / CLOCKS_PER_SEC;

GPU/GPUTracking/Definitions/GPUSettingsList.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,7 @@ AddOption(oclPlatformNum, int32_t, -1, "", 0, "Platform to use, in case the back
326326
AddOption(oclCompileFromSources, bool, false, "", 0, "Compile OpenCL binary from included source code instead of using included spirv code")
327327
AddOption(oclOverrideSourceBuildFlags, std::string, "", "", 0, "Override OCL build flags for compilation from source, put a space for empty options")
328328
AddOption(printSettings, bool, false, "", 0, "Print all settings when initializing")
329+
AddOption(tpcFreeAllocatedMemoryAfterProcessing, bool, false, "", 0, "Clean all memory allocated by TPC when TPC processing done, only data written to external output resources will remain")
329330
AddVariable(eventDisplay, o2::gpu::GPUDisplayFrontendInterface*, nullptr)
330331
AddSubConfig(GPUSettingsProcessingRTC, rtc)
331332
AddSubConfig(GPUSettingsProcessingParam, param)

0 commit comments

Comments
 (0)