-
-
Notifications
You must be signed in to change notification settings - Fork 608
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
Expose env var to disallow cuda #1834
Conversation
ebc1b30
to
5e7b5d0
Compare
Thanks Ian! Should we instruct users to set |
Yeah, that sounds good. I didn't know about that (for anyone else that didn't https://developer.nvidia.com/blog/cuda-pro-tip-control-gpu-visibility-cuda_visible_devices/) As long as it appears in a google for "Flux disable CUDA" then I'd have caught it. |
Can this disable the loading completely? |
Since CUDA the symbol is already in the flux namespace that might lead to dirtier code in the repo. |
What does "might lead to dirtier code" even mean? Loading CUDA unconditionally is literally half the loading time of Flux. If it can be avoided, that's a huge win. If it has to be in breaking v0.13, that's fine. But I haven't tried, there may be some actual problem with this idea. If possible, it would be nicest if the solution could be shared with other packages. Which means |
It's possible that we can set |
Yes, on searching, there is more random CuArray code scattered about than I remembered. Although most of it should really move to NNlibCUDA. Maybe that's a bigger project than Ian has volunteered for... no downside to small steps first. |
Instead of adding a new env variable, we can just document
or more generally the use of CUDA_VISIBLE_DEVICES |
1835: Document disabling GPUs r=DhairyaLGandhi a=DhairyaLGandhi From the discussion in #1834 1836: Try using latest cu(DNN) binaries r=DhairyaLGandhi a=ToucheSir Possible alternative to #1822. Co-authored-by: Dhairya Gandhi <dhairya@juliacomputing.com> Co-authored-by: Brian Chen <ToucheSir@users.noreply.github.com>
@IanButterworth do we need this still? |
I don't think so. Thanks! |
While it's possible to set
Flux.use_cuda[] = false
, on some machines with underpowered but cuda-functional gpus, it would be nice to have a more system-wide permanent way to opt out of cuda.So this adds env var
FLUX_DISALLOW_CUDA
which can be set to "true" etc. to disallow cuda