Skip to content

Commit f41b7b8

Browse files
committed
GPU: Unify GPU kernel error handling code
1 parent dd74f72 commit f41b7b8

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

GPU/GPUTracking/Base/GPUReconstructionCPU.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ inline int32_t GPUReconstructionCPU::runKernel(krnlSetup&& setup, Args&&... args
234234
}
235235
double deviceTimerTime = 0.;
236236
int32_t retVal = runKernelImplWrapper(gpu_reconstruction_kernels::classArgument<S, I>(), cpuFallback, deviceTimerTime, std::forward<krnlSetup&&>(setup), std::forward<Args>(args)...);
237-
if (GPUDebug(GetKernelName<S, I>(), stream)) {
237+
if (GPUDebug(GetKernelName<S, I>(), stream, mProcessingSettings.checkKernelFailures)) {
238238
throw std::runtime_error("kernel failure");
239239
}
240240
if (mProcessingSettings.debugLevel >= 1) {

GPU/GPUTracking/Base/cuda/GPUReconstructionCUDAKernels.cu

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,6 @@ int32_t GPUReconstructionCUDABackend::runKernelBackend(const krnlSetupArgs<T, I,
8181
std::apply([this, &args](auto&... vals) { this->runKernelBackendInternal<T, I, Args...>(args.s, vals...); }, args.v);
8282
}
8383
GPUFailedMsg(cudaGetLastError());
84-
if (mProcessingSettings.checkKernelFailures) {
85-
if (GPUDebug(GetKernelName<T, I>(), args.s.x.stream, true)) {
86-
throw std::runtime_error("Kernel Failure");
87-
}
88-
}
8984
if (z.ev) {
9085
GPUFailedMsg(cudaEventRecord(*(cudaEvent_t*)z.ev, mInternals->Streams[x.stream]));
9186
}

0 commit comments

Comments
 (0)