-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement hermetic cuda usage across TF projects.
PiperOrigin-RevId: 616865795
- Loading branch information
1 parent
cf3ccda
commit 3359d97
Showing
46 changed files
with
2,271 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -232,7 +232,6 @@ build:cuda --@local_config_cuda//:enable_cuda | |
# CUDA: This config refers to building CUDA op kernels with clang. | ||
build:cuda_clang --config=cuda | ||
# Enable TensorRT optimizations https://developer.nvidia.com/tensorrt | ||
build:cuda_clang --config=tensorrt | ||
build:cuda_clang --action_env=TF_CUDA_CLANG="1" | ||
build:cuda_clang --@local_config_cuda//:cuda_compiler=clang | ||
# Select supported compute capabilities (supported graphics cards). | ||
|
@@ -247,12 +246,10 @@ build:cuda_clang --repo_env=TF_CUDA_COMPUTE_CAPABILITIES="sm_60,sm_70,sm_80,sm_8 | |
|
||
# Set up compilation CUDA version and paths and use the CUDA Clang toolchain. | ||
build:cuda_clang_official --config=cuda_clang | ||
build:cuda_clang_official --action_env=TF_CUDA_VERSION="12" | ||
build:cuda_clang_official --action_env=TF_CUDA_VERSION="12.3" | ||
build:cuda_clang_official --action_env=TF_CUDNN_VERSION="8" | ||
build:cuda_clang_official --action_env=CUDA_TOOLKIT_PATH="/usr/local/cuda-12.3" | ||
build:cuda_clang_official --action_env=GCC_HOST_COMPILER_PATH="/dt9/usr/bin/gcc" | ||
build:cuda_clang_official --action_env=CLANG_CUDA_COMPILER_PATH="/usr/lib/llvm-17/bin/clang" | ||
build:cuda_clang_official --action_env=LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64" | ||
build:cuda_clang_official --crosstool_top="@sigbuild-r2.16-clang_config_cuda//crosstool:toolchain" | ||
|
||
# Build with nvcc for CUDA and clang for host | ||
|
@@ -533,9 +530,7 @@ build:rbe_linux_cuda --config=rbe_linux_cpu | |
# For Remote build execution -- GPU configuration | ||
build:rbe_linux_cuda --repo_env=REMOTE_GPU_TESTING=1 | ||
build:rbe_linux_cuda --repo_env=TF_CUDA_CONFIG_REPO="@sigbuild-r2.16-clang_config_cuda" | ||
build:rbe_linux_cuda --repo_env=TF_TENSORRT_CONFIG_REPO="@sigbuild-r2.16-clang_config_tensorrt" | ||
build:rbe_linux_cuda --repo_env=TF_NCCL_CONFIG_REPO="@sigbuild-r2.16-clang_config_nccl" | ||
test:rbe_linux_cuda --test_env=LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64" | ||
|
||
build:rbe_linux_cuda_nvcc --config=rbe_linux_cuda | ||
build:rbe_linux_cuda_nvcc --config=nvcc_clang | ||
|
@@ -629,7 +624,6 @@ build:release_cpu_linux_base --repo_env=BAZEL_COMPILER="/usr/lib/llvm-17/bin/cla | |
# Test-related settings below this point. | ||
test:release_linux_base --build_tests_only --keep_going --test_output=errors --verbose_failures=true | ||
test:release_linux_base --local_test_jobs=HOST_CPUS | ||
test:release_linux_base --test_env=LD_LIBRARY_PATH | ||
# Give only the list of failed tests at the end of the log | ||
test:release_linux_base --test_summary=short | ||
|
||
|
@@ -641,7 +635,6 @@ build:release_gpu_linux --config=release_cpu_linux | |
# Set up compilation CUDA version and paths and use the CUDA Clang toolchain. | ||
# Note that linux cpu and cuda builds share the same toolchain now. | ||
build:release_gpu_linux --config=cuda_clang_official | ||
test:release_gpu_linux --test_env=LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64" | ||
# Local test jobs has to be 4 because parallel_gpu_execute is fragile, I think | ||
test:release_gpu_linux --test_timeout=300,450,1200,3600 --local_test_jobs=4 --run_under=//tensorflow/tools/ci_build/gpu_build:parallel_gpu_execute | ||
|
||
|
@@ -672,9 +665,6 @@ build:unsupported_gpu_linux --config=unsupported_cpu_linux | |
build:unsupported_gpu_linux --action_env=TF_CUDA_VERSION="11" | ||
build:unsupported_gpu_linux --action_env=TF_CUDNN_VERSION="8" | ||
build:unsupported_gpu_linux --repo_env=TF_CUDA_COMPUTE_CAPABILITIES="sm_35,sm_50,sm_60,sm_70,sm_75,compute_80" | ||
build:unsupported_gpu_linux --config=tensorrt | ||
build:unsupported_gpu_linux --action_env=CUDA_TOOLKIT_PATH="/usr/local/cuda-11.2" | ||
build:unsupported_gpu_linux --action_env=LD_LIBRARY_PATH="/usr/local/cuda:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda-11.1/lib64:/usr/local/tensorrt/lib" | ||
build:unsupported_gpu_linux --action_env=GCC_HOST_COMPILER_PATH="/dt9/usr/bin/gcc" | ||
build:unsupported_gpu_linux [email protected]_manylinux2014-cuda11.2-cudnn8.1-tensorrt7.2_config_cuda//crosstool:toolchain | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -232,7 +232,6 @@ build:cuda --@local_config_cuda//:enable_cuda | |
# CUDA: This config refers to building CUDA op kernels with clang. | ||
build:cuda_clang --config=cuda | ||
# Enable TensorRT optimizations https://developer.nvidia.com/tensorrt | ||
build:cuda_clang --config=tensorrt | ||
build:cuda_clang --action_env=TF_CUDA_CLANG="1" | ||
build:cuda_clang --@local_config_cuda//:cuda_compiler=clang | ||
# Select supported compute capabilities (supported graphics cards). | ||
|
@@ -247,12 +246,10 @@ build:cuda_clang --repo_env=TF_CUDA_COMPUTE_CAPABILITIES="sm_60,sm_70,sm_80,sm_8 | |
|
||
# Set up compilation CUDA version and paths and use the CUDA Clang toolchain. | ||
build:cuda_clang_official --config=cuda_clang | ||
build:cuda_clang_official --action_env=TF_CUDA_VERSION="12" | ||
build:cuda_clang_official --action_env=TF_CUDA_VERSION="12.3" | ||
build:cuda_clang_official --action_env=TF_CUDNN_VERSION="8" | ||
build:cuda_clang_official --action_env=CUDA_TOOLKIT_PATH="/usr/local/cuda-12.3" | ||
build:cuda_clang_official --action_env=GCC_HOST_COMPILER_PATH="/dt9/usr/bin/gcc" | ||
build:cuda_clang_official --action_env=CLANG_CUDA_COMPILER_PATH="/usr/lib/llvm-17/bin/clang" | ||
build:cuda_clang_official --action_env=LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64" | ||
build:cuda_clang_official --crosstool_top="@sigbuild-r2.16-clang_config_cuda//crosstool:toolchain" | ||
|
||
# Build with nvcc for CUDA and clang for host | ||
|
@@ -533,9 +530,7 @@ build:rbe_linux_cuda --config=rbe_linux_cpu | |
# For Remote build execution -- GPU configuration | ||
build:rbe_linux_cuda --repo_env=REMOTE_GPU_TESTING=1 | ||
build:rbe_linux_cuda --repo_env=TF_CUDA_CONFIG_REPO="@sigbuild-r2.16-clang_config_cuda" | ||
build:rbe_linux_cuda --repo_env=TF_TENSORRT_CONFIG_REPO="@sigbuild-r2.16-clang_config_tensorrt" | ||
build:rbe_linux_cuda --repo_env=TF_NCCL_CONFIG_REPO="@sigbuild-r2.16-clang_config_nccl" | ||
test:rbe_linux_cuda --test_env=LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64" | ||
|
||
build:rbe_linux_cuda_nvcc --config=rbe_linux_cuda | ||
build:rbe_linux_cuda_nvcc --config=nvcc_clang | ||
|
@@ -629,7 +624,6 @@ build:release_cpu_linux_base --repo_env=BAZEL_COMPILER="/usr/lib/llvm-17/bin/cla | |
# Test-related settings below this point. | ||
test:release_linux_base --build_tests_only --keep_going --test_output=errors --verbose_failures=true | ||
test:release_linux_base --local_test_jobs=HOST_CPUS | ||
test:release_linux_base --test_env=LD_LIBRARY_PATH | ||
# Give only the list of failed tests at the end of the log | ||
test:release_linux_base --test_summary=short | ||
|
||
|
@@ -641,7 +635,6 @@ build:release_gpu_linux --config=release_cpu_linux | |
# Set up compilation CUDA version and paths and use the CUDA Clang toolchain. | ||
# Note that linux cpu and cuda builds share the same toolchain now. | ||
build:release_gpu_linux --config=cuda_clang_official | ||
test:release_gpu_linux --test_env=LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64" | ||
# Local test jobs has to be 4 because parallel_gpu_execute is fragile, I think | ||
test:release_gpu_linux --test_timeout=300,450,1200,3600 --local_test_jobs=4 --run_under=//tensorflow/tools/ci_build/gpu_build:parallel_gpu_execute | ||
|
||
|
@@ -672,9 +665,6 @@ build:unsupported_gpu_linux --config=unsupported_cpu_linux | |
build:unsupported_gpu_linux --action_env=TF_CUDA_VERSION="11" | ||
build:unsupported_gpu_linux --action_env=TF_CUDNN_VERSION="8" | ||
build:unsupported_gpu_linux --repo_env=TF_CUDA_COMPUTE_CAPABILITIES="sm_35,sm_50,sm_60,sm_70,sm_75,compute_80" | ||
build:unsupported_gpu_linux --config=tensorrt | ||
build:unsupported_gpu_linux --action_env=CUDA_TOOLKIT_PATH="/usr/local/cuda-11.2" | ||
build:unsupported_gpu_linux --action_env=LD_LIBRARY_PATH="/usr/local/cuda:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda-11.1/lib64:/usr/local/tensorrt/lib" | ||
build:unsupported_gpu_linux --action_env=GCC_HOST_COMPILER_PATH="/dt9/usr/bin/gcc" | ||
build:unsupported_gpu_linux [email protected]_manylinux2014-cuda11.2-cudnn8.1-tensorrt7.2_config_cuda//crosstool:toolchain | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.