@@ -18,7 +18,7 @@ __set_cuda_symlinks_envvars () {
18
18
local conda_prefix=$( conda run ${env_prefix} printenv CONDA_PREFIX)
19
19
local new_cuda_home=" ${conda_prefix} /targets/${MACHINE_NAME_LC} -linux"
20
20
21
- if [[ " $BUILD_CUDA_VERSION " =~ ^12.6 .* $ ]]; then
21
+ if ! [[ " $BUILD_CUDA_VERSION " =~ ^11 .* $ ]]; then
22
22
# CUDA 12.6 installation has a very different package layout than previous
23
23
# CUDA versions - notably, NVTX has been moved elsewhere, which causes
24
24
# PyTorch CMake scripts to complain.
@@ -89,7 +89,7 @@ __set_nvcc_prepend_flags () {
89
89
# which overrides whatever `-ccbin` flag we set manually, so remove this
90
90
# unwanted hook
91
91
print_exec ls -la " ${conda_prefix} /etc/conda/activate.d"
92
- if [[ " $BUILD_CUDA_VERSION " =~ ^12.6 .* $ ]]; then
92
+ if ! [[ " $BUILD_CUDA_VERSION " =~ ^11 .* $ ]]; then
93
93
echo " [INSTALL] Removing the -ccbin=CXX hook from NVCC activation scripts ..."
94
94
print_exec sed -i ' /-ccbin=/d' " ${conda_prefix} /etc/conda/activate.d/*cuda-nvcc_activate.sh"
95
95
fi
@@ -192,14 +192,14 @@ install_cuda () {
192
192
# in the future, we will be using conda-forge for installing all CUDA versions
193
193
# (except for versions 11.8 and below, which are only available through
194
194
# nvidia/label/cuda-*)
195
- if [[ " $BUILD_CUDA_VERSION " =~ ^12.6.* $ ]]; then
196
- # shellcheck disable=SC2086
197
- (exec_with_retries 3 conda install --force-reinstall ${env_prefix} -c conda-forge --override-channels -y \
198
- cuda=${cuda_version} ) || return 1
199
- else
195
+ if [[ " $BUILD_CUDA_VERSION " =~ ^11.* $ ]]; then
200
196
# shellcheck disable=SC2086
201
197
(exec_with_retries 3 conda install --force-reinstall ${env_prefix} -c " nvidia/label/cuda-${cuda_version} " -y \
202
198
cuda) || return 1
199
+ else
200
+ # shellcheck disable=SC2086
201
+ (exec_with_retries 3 conda install --force-reinstall ${env_prefix} -c conda-forge --override-channels -y \
202
+ cuda=${cuda_version} ) || return 1
203
203
fi
204
204
205
205
# Set the symlinks and environment variables not covered by conda install
0 commit comments