Providing OS_LIBCUDA_FOUND
and GPU_AVAILABLE
type constants to easyconfigs for convenient checking
#4183
Labels
Milestone
Providing something like
OS_LIBCUDA_FOUND
andGPU_AVAILABLE
could make things more convenient for making easyconfigs with generic easyblocks (e.g. PythonBundle) to determine if they should try to run sanity check or tests. (as we want to test as much as possible when we can, but also make it possible to just build stuff without the GPU as many rely on that for their deployments)Discussion arose from
CuPy
whose sanity check (import cupy
) won't work unless cuda driver libraries are present (CUDA dependency isn't enough).and similarly running the test suite here won't work without also actually having a GPU.
Most troubling is the sanity check, which isn't as easily skipped.
It would certainly be up to each easyconfig (or block) to clearly warn about this:
Counter point: Perhaps us trying to detect it is a bad idea; perhaps it should be up to the user to explicitly --skip-tests when they need to build CUDA software on a non GPU machine. Even a warning is easy to miss.
I'm also not sure how many ECs this would be relevant for. CuPy is the only example i know off right away (and it has.. somewhat acceptable workarounds)
The text was updated successfully, but these errors were encountered: