-
Notifications
You must be signed in to change notification settings - Fork 403
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
Clang cannot detect hermetic cuda version #16877
Comments
I have this error:
|
external/xla/xla/stream_executor/cuda/cuda_status.h:22:10: fatal error: 'third_party/gpus/cuda/include/cuda.h' file not found
#include "third_party/gpus/cuda/include/cuda.h" python3 build/build.py --enable_cuda --cuda_compute_capabilities=sm_87 --bazel_options=--repo_env=LOCAL_CUDA_PATH="/usr/local/cuda-12.2" --bazel_options=--repo_env=LOCAL_CUDNN_PATH="/usr/lib/aarch64-linux-gnu" System info (python version, jaxlib version, accelerator, etc.)Jetson AGX Orin 22.04 cuda 12.2 |
Hi @johnnynunez it was an architectural decision to make CUDA_VERSION defined explicitly instead of looking it up implicitly in the old non-hermetic CUDA rules. So, if you are using a local source of CUDA/CUDNN redistributions (which is not recommended), you still need to pass the correct HERMETIC_CUDA_VERSION and HERMETIC_CUDNN_VERSION in the parameters of Python script. Also please make sure that the structure of the folders with CUDA, CUDNN and NCCL is exactly the same as described in the instructions. This structure is in line with the structure of redistributions which can be downloaded from NVIDIA site. If you absolutely need repository rule to discover the CUDA version installed locally, you can use the deprecated method documented here. |
see internally the jsons both are aarch64
Yes, I totally agree. But you have or rather XLA has the failure to consider SBSA as AARCH64. When the jetson is tegra chip and uses aarch64 but they are other packages |
Thank you for the clarification, I understand the issue now. |
Hello, are there JETSON_PLATFORM variable? i’ve tried to differentiate getting the board id, like jetson containers does. https://github.com/dusty-nv/jetson-containers/blob/master/jetson_containers/l4t_version.py jetson doesn’t have NCCL. |
Hi @johnnynunez , can we use |
my idea was like detect automatically: |
Do you mean the line |
I've posted a workaround here. |
When using the hermetic CUDA toolchain with Clang, the CUDA version is not actually detected by Clang and defaults to the latest known toolkit version. Clang searches for
external/cuda_nvcc/include/cuda.h
, and when it is not found, the version detection logic switches toCudaVersion::NEW
.For instance, in clang 18.1.8, CudaVersion::NEW is 12.3. When we set
HERMETIC_CUDA_VERSION="12.2.0"
, this mismatch and failed detection causes clang to use isa 8.3 which is incompatible with cuda 12.2.0.The easiest fix is probably to copy
external/cuda_cudart/include/cuda.h
intoexternal/cuda_nvcc/include/cuda.h
.The text was updated successfully, but these errors were encountered: