Skip to content

Commit

Permalink
Renamed nvcc_clang to cuda_nvcc according to the changes in JAX
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 679322660
  • Loading branch information
Google-ML-Automation committed Sep 27, 2024
1 parent 7c5cc91 commit f8e341a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
11 changes: 6 additions & 5 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,11 @@ build:cuda_clang_official --action_env=CLANG_CUDA_COMPILER_PATH="/usr/lib/llvm-1
build:cuda_clang_official --crosstool_top="@local_config_cuda//crosstool:toolchain"

# Build with nvcc for CUDA and clang for host
build:nvcc_clang --config=cuda
build:nvcc_clang --action_env=TF_NVCC_CLANG="1"
build:nvcc_clang --@local_config_cuda//:cuda_compiler=nvcc

build:cuda_nvcc --config=cuda
build:cuda_nvcc --action_env=TF_NVCC_CLANG="1"
build:cuda_nvcc --@local_config_cuda//:cuda_compiler=nvcc
# Old config for backward compatibility
build:nvcc_clang --config=cuda_nvcc

# Debug config
build:dbg -c dbg
Expand Down Expand Up @@ -550,7 +551,7 @@ build:rbe_linux_cuda --config=rbe_linux_cpu
build:rbe_linux_cuda --repo_env=REMOTE_GPU_TESTING=1

build:rbe_linux_cuda_nvcc --config=rbe_linux_cuda
build:rbe_linux_cuda_nvcc --config=nvcc_clang
build:rbe_linux_cuda_nvcc --config=cuda_nvcc
build:rbe_linux_cuda_nvcc --repo_env TF_NCCL_USE_STUB=1

build:rbe_win_base --config=rbe_base
Expand Down
2 changes: 1 addition & 1 deletion build_tools/configure/configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def to_bazelrc_lines(
f"build --action_env CLANG_CUDA_COMPILER_PATH={dpav.clang_path}"
)
elif compiler_pair == (CudaCompiler.NVCC, HostCompiler.CLANG):
rc.append("build --config nvcc_clang")
rc.append("build --config cuda_nvcc")
# This is demanded by cuda_configure.bzl
rc.append(
f"build --action_env CLANG_CUDA_COMPILER_PATH={dpav.clang_path}"
Expand Down
2 changes: 1 addition & 1 deletion build_tools/configure/testdata/nvcc_clang.bazelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
build --action_env CLANG_COMPILER_PATH=/usr/lib/llvm-18/bin/clang
build --repo_env CC=/usr/lib/llvm-18/bin/clang
build --repo_env BAZEL_COMPILER=/usr/lib/llvm-18/bin/clang
build --config nvcc_clang
build --config cuda_nvcc
build --action_env CLANG_CUDA_COMPILER_PATH=/usr/lib/llvm-18/bin/clang
build:cuda --repo_env HERMETIC_CUDA_VERSION="12.1.1"
build:cuda --repo_env HERMETIC_CUDA_COMPUTE_CAPABILITIES=7.5
Expand Down
11 changes: 6 additions & 5 deletions third_party/tsl/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,11 @@ build:cuda_clang_official --action_env=CLANG_CUDA_COMPILER_PATH="/usr/lib/llvm-1
build:cuda_clang_official --crosstool_top="@local_config_cuda//crosstool:toolchain"

# Build with nvcc for CUDA and clang for host
build:nvcc_clang --config=cuda
build:nvcc_clang --action_env=TF_NVCC_CLANG="1"
build:nvcc_clang --@local_config_cuda//:cuda_compiler=nvcc

build:cuda_nvcc --config=cuda
build:cuda_nvcc --action_env=TF_NVCC_CLANG="1"
build:cuda_nvcc --@local_config_cuda//:cuda_compiler=nvcc
# Old config for backward compatibility
build:nvcc_clang --config=cuda_nvcc

# Debug config
build:dbg -c dbg
Expand Down Expand Up @@ -550,7 +551,7 @@ build:rbe_linux_cuda --config=rbe_linux_cpu
build:rbe_linux_cuda --repo_env=REMOTE_GPU_TESTING=1

build:rbe_linux_cuda_nvcc --config=rbe_linux_cuda
build:rbe_linux_cuda_nvcc --config=nvcc_clang
build:rbe_linux_cuda_nvcc --config=cuda_nvcc
build:rbe_linux_cuda_nvcc --repo_env TF_NCCL_USE_STUB=1

build:rbe_win_base --config=rbe_base
Expand Down

0 comments on commit f8e341a

Please sign in to comment.