Skip to content

Commit b6f15f8

Browse files
committed
GPU RTC: Add keepTempFiles option
1 parent 010f867 commit b6f15f8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,10 @@ void GPUReconstructionCUDA::genAndLoadRTC()
420420
mInternals->kernelModules.emplace_back(std::make_unique<CUmodule>());
421421
GPUChkErr(cuModuleLoad(mInternals->kernelModules.back().get(), (filename + "_" + std::to_string(i) + mRtcBinExtension).c_str()));
422422
}
423-
remove((filename + "_" + std::to_string(i) + mRtcSrcExtension).c_str());
424-
remove((filename + "_" + std::to_string(i) + mRtcBinExtension).c_str());
423+
if (!GetProcessingSettings().rtctech.keepTempFiles) {
424+
remove((filename + "_" + std::to_string(i) + mRtcSrcExtension).c_str());
425+
remove((filename + "_" + std::to_string(i) + mRtcBinExtension).c_str());
426+
}
425427
}
426428
if (GetProcessingSettings().rtctech.runTest == 2) {
427429
return;

GPU/GPUTracking/Definitions/GPUSettingsList.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ AddOption(cacheFolder, std::string, "./rtccache/", "", 0, "Folder in which the c
233233
AddOption(prependCommand, std::string, "", "", 0, "Prepend RTC compilation commands by this string")
234234
AddOption(overrideArchitecture, std::string, "", "", 0, "Override arhcitecture part of RTC compilation command line") // Part of cmdLine, so checked against the cache
235235
AddOption(loadLaunchBoundsFromFile, std::string, "", "", 0, "Load a parameter object containing the launch bounds from a file")
236+
AddOption(keepTempFiles, bool, false, "", 0, "Keep temporary source and object files")
236237
AddHelp("help", 'h')
237238
EndConfig()
238239

0 commit comments

Comments
 (0)