openxla / xla

A machine learning compiler for GPUs, CPUs, and ML accelerators
Apache License 2.0
2.75k stars 442 forks source link

Hermetic CUDA no longer respects TF_DOWNLOAD_CLANG #16866

Open tchatow opened 2 months ago

tchatow commented 2 months ago

The hermetic cuda toolchain with --config=cuda_clang always looks for a local clang. It is useful to be able to download a hermetic clang as well.

Even with the local cuda toolchain this option was somewhat broken since third_party/tsl/third_party/clang_toolchain/download_clang.bzl uses a Chromium clang built without Cuda support; I would patch this to download clang from https://github.com/llvm/llvm-project/releases instead.

cheshire commented 2 months ago

@beckerhe to me it would conceptually make most sense to fix the entire toolchain by default and download it, instead of trying to build with the system compiler.

johnnynunez commented 2 months ago

@beckerhe to me it would conceptually make most sense to fix the entire toolchain by default and download it, instead of trying to build with the system compiler.

I'm getting the same error always in jax: 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 --enable_nccl=False --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"

what i'm doing wrong?