Skip to content

Commit a8aa013

Browse files
committed
GPU RTC: Add overrideWarpSize option
1 parent 768fd50 commit a8aa013

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

GPU/GPUTracking/Base/cuda/GPUReconstructionCUDA.cu

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ int32_t GPUReconstructionCUDA::InitDevice_Runtime()
113113
constexpr int32_t reqVerMin = 0;
114114
#endif
115115
if (GetProcessingSettings().rtc.enable && GetProcessingSettings().rtctech.runTest == 2) {
116-
mWarpSize = GPUCA_WARP_SIZE;
116+
mWarpSize = GetProcessingSettings().rtc.overrideWarpSize != -1 ? GetProcessingSettings().rtc.overrideWarpSize : GPUCA_WARP_SIZE;
117117
genAndLoadRTC();
118118
exit(0);
119119
}
@@ -245,7 +245,7 @@ int32_t GPUReconstructionCUDA::InitDevice_Runtime()
245245
GPUInfo("\ttextureAlignment = %ld", (uint64_t)deviceProp.textureAlignment);
246246
GPUInfo(" ");
247247
}
248-
if (deviceProp.warpSize != GPUCA_WARP_SIZE && !GetProcessingSettings().rtc.enable) {
248+
if (GetProcessingSettings().rtc.enable ? (GetProcessingSettings().rtc.overrideWarpSize != -1 && deviceProp.warpSize != GetProcessingSettings().rtc.overrideWarpSize) : (deviceProp.warpSize != GPUCA_WARP_SIZE)) {
249249
throw std::runtime_error("Invalid warp size on GPU");
250250
}
251251
mWarpSize = deviceProp.warpSize;

GPU/GPUTracking/Definitions/GPUSettingsList.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ AddOption(optSpecialCode, int8_t, -1, "", 0, "Insert GPUCA_RTC_SPECIAL_CODE spec
216216
AddOption(deterministic, bool, false, "", 0, "Compile RTC in deterministic mode, with NO_FAST_MATH flags and GPUCA_DETERMINISTIC_MODE define")
217217
AddOption(compilePerKernel, bool, true, "", 0, "Run one RTC compilation per kernel")
218218
AddOption(enable, bool, false, "", 0, "Use RTC to optimize GPU code")
219+
AddOption(overrideWarpSize, int32_t, -1, "", 0, "Override the warp size to be used for RTC")
219220
AddHelp("help", 'h')
220221
EndConfig()
221222

0 commit comments

Comments
 (0)