If CUDA is not found and USE_CUDA!=0, report error and ask user to set USE_CUDA=0#24939
If CUDA is not found and USE_CUDA!=0, report error and ask user to set USE_CUDA=0#24939xuhdev wants to merge 3 commits intopytorch:masterfrom
Conversation
…t USE_CUDA=0 Currently we emit a warning and set USE_CUDA=0 in our script by ourselves. Instead, we should report an error and let user do this explicitly, as whether CUDA is used or not would affect so much of PyTorch. Per request by @jithunnair-amd
|
@pytorchbot rebase this please |
|
I don't have an opinion on this change, but I don't actually see anyone requesting this. The request linked, as I understand it, is about having a canonical variable that defines whether we are actually building with CUDA or not. Edit: actually I think this is too user hostile, particularly when AFAICT no one is asking for it. |
|
@gchanan To be clear, this PR is to unblock the AMD patch which doesn't work because the cmake variable is not set appropriately early enough. So there is a use case, but not from end users. |
Hope to resolve pytorch/pytorch#24939
Hope to resolve the CI failure in pytorch/pytorch#24939
Hope to resolve the CI failure in pytorch/pytorch#24939
|
Since pytorch/builder#345 is resolved, any idea when that will take effect so we can run a retest? |
|
@ezyang I understand, I believe that issue could be resolved in a different way. |
|
The alternative I can think of would be to run all CUDA detection code before depending options are defined. Given the current status of the CUDA detection code, this might be difficult. |
|
@gchanan I sense an impasse. Can you please provide some direction, so the RCCL upstreaming PR can move forward (it's waiting on this)? |
|
@pytorchbot rebase this please |
|
CC @kostmo. @jithunnair-amd: is my summary above incorrect?
So, I'd suggest we have a canonical way of saying whether we are actually building with CUDA or not. Now, I don't know all the rules we've defined for flags, it seems like in general we are using |
That sounds correct to me. |
|
@gchanan I agree that we should be consistent regarding this point, but it doesn't seem to be consistent. For example, currently pytorch/cmake/public/cuda.cmake Lines 41 to 43 in f5a3d59 |
|
idk, that seems like a plausible choice. |
|
Closing now |
Currently we emit a warning and set USE_CUDA=0 in our script by ourselves. Instead, we should report an error and let user do this explicitly, as whether CUDA is used or not would affect so much of PyTorch.
Best viewed with "hide whitespace changes".
Per request by @jithunnair-amd at #23884 (comment)