Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Providing OS_LIBCUDA_FOUND and GPU_AVAILABLE type constants to easyconfigs for convenient checking #4183

Open
Micket opened this issue Jan 18, 2023 · 0 comments
Milestone

Comments

@Micket
Copy link
Contributor

Micket commented Jan 18, 2023

Providing something like OS_LIBCUDA_FOUND and GPU_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).

if not OS_LIBCUDA_FOUND:
    modulename = False

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:

if not GPU_AVAILABLE:
    print_warning = "not running tests, no GPU available"
    ...

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)

@boegel boegel added this to the 4.x milestone Jan 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants