-
-
Notifications
You must be signed in to change notification settings - Fork 19
Description
I'm running into issues compiling CUDA code on a system with an RTX 4090 GPU and CUDA 11.3. Initially, I was receiving the following error when running a script that uses runtime CUDA compilation: nvrtc: error: invalid value for --gpu-architecture (-arch). At this point, I had not manually specified any --gpu-architecture flags in my setup scripts. It seems that PyTorch or one of its dependencies was automatically detecting my GPU's compute capability (8.9) and attempting to compile for it. Since CUDA 11.3 predates the RTX 4090, it doesn't recognize compute_89, and nvrtc throws this error. To try to resolve this, I manually added -gencode=arch=compute_89,code=sm_89 to my setup.py, but then received a new error from nvcc: nvcc fatal : Unsupported gpu architecture 'compute_89'. This confirms that CUDA 11.3 does not support building for compute_89 in any form. From this, it seems that the underlying issue is automatic architecture detection clashing with an outdated CUDA toolkit. I’m wondering if there’s a way to force these libraries or PyTorch to use a supported fallback architecture like compute_86, or whether the only solution is to upgrade to a newer CUDA version like 12.1+ that officially supports the 4090.