[libomptarget][cuda] Gracefully handle missing cuda library
If using dynamic cuda, and it failed to load, it is not safe to call
cuGetErrorString.
Differential D95412
[libomptarget][cuda] Gracefully handle missing cuda library JonChesterfield on Jan 25 2021, 6:26 PM. Authored by
Details [libomptarget][cuda] Gracefully handle missing cuda library If using dynamic cuda, and it failed to load, it is not safe to call
Diff Detail
Unit Tests Event TimelineComment Actions Noticed when running offloading on a system with no cuda available. Failing to load cuda from the global constructor didn't matter, but the segv on calling cuGetErrorString did. An existing hazard, this plugin doesn't record whether the constructor initialisation succeeded (aside from debug messages). If it failed, but there are nvptx offloading images present, I think libomptarget will call back into this library despite the constructor failing, and I'm not sure that will reliably report an error instead of crash. Reading the code suggests it'll deference nullptr for the StreamManager. Comment Actions This has failed a CI run, libomp::nested.c, but I don't understand the test output. Going to revert this for now. |
clang-tidy: error: 'Debug.h' file not found [clang-diagnostic-error]
not useful