Skip to content
Snippets Groups Projects
Commit ee9328a0 authored by Lofar test build account's avatar Lofar test build account
Browse files

Task #5385: [mol] Do not crash when querying unused timers (useful when...

Task #5385: [mol] Do not crash when querying unused timers (useful when disabling kernels during debug sessions)
parent add22818
No related branches found
No related tags found
No related merge requests found
......@@ -802,7 +802,17 @@ namespace LOFAR
ScopedCurrentContext scc(_context);
float ms;
checkCuCall(cuEventElapsedTime(&ms, other, _event));
try {
checkCuCall(cuEventElapsedTime(&ms, other, _event));
} catch (LOFAR::Cobalt::gpu::CUDAException &ex) {
// Prevent crashes caused by querying unused timers
//
// NOTE: checkCuCall already logs the error
ms = 0.0f;
}
return ms;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment