@@ -52,31 +52,35 @@ if [[ -z "$USE_CUDA" || "$USE_CUDA" == 1 ]]; then
52
52
fi
53
53
if [[ -n " $build_with_cuda " ]]; then
54
54
export TORCH_NVCC_FLAGS=" -Xfatbin -compress-all"
55
- export TORCH_CUDA_ARCH_LIST=" 3.7+PTX;5.0"
55
+ TORCH_CUDA_ARCH_LIST=" 3.7+PTX;5.0"
56
56
export USE_STATIC_CUDNN=1 # links cudnn statically (driven by tools/setup_helpers/cudnn.py)
57
57
58
58
if [[ $CUDA_VERSION == 11.6* ]]; then
59
- export TORCH_CUDA_ARCH_LIST=" $TORCH_CUDA_ARCH_LIST ;6.0;6.1;7.0;7.5;8.0;8.6"
59
+ TORCH_CUDA_ARCH_LIST=" $TORCH_CUDA_ARCH_LIST ;6.0;6.1;7.0;7.5;8.0;8.6"
60
60
# for cuda 11.5 we use cudnn 8.3.2.44 https://docs.nvidia.com/deeplearning/cudnn/release-notes/rel_8.html
61
61
# which does not have single static libcudnn_static.a deliverable to link with
62
62
export USE_STATIC_CUDNN=0
63
63
# for cuda 11.5 include all dynamic loading libraries
64
64
DEPS_LIST=(/usr/local/cuda/lib64/libcudnn* .so.8 /usr/local/cuda-11.6/extras/CUPTI/lib64/libcupti.so.11.6)
65
65
elif [[ $CUDA_VERSION == 11.7* ]]; then
66
- export TORCH_CUDA_ARCH_LIST=" $TORCH_CUDA_ARCH_LIST ;6.0;6.1;7.0;7.5;8.0;8.6"
66
+ TORCH_CUDA_ARCH_LIST=" $TORCH_CUDA_ARCH_LIST ;6.0;6.1;7.0;7.5;8.0;8.6"
67
67
# for cuda 11.7 we use cudnn 8.5
68
68
# which does not have single static libcudnn_static.a deliverable to link with
69
69
export USE_STATIC_CUDNN=0
70
70
# for cuda 11.7 include all dynamic loading libraries
71
71
DEPS_LIST=(/usr/local/cuda/lib64/libcudnn* .so.8 /usr/local/cuda-11.7/extras/CUPTI/lib64/libcupti.so.11.7)
72
72
elif [[ $CUDA_VERSION == 11.8* ]]; then
73
- export TORCH_CUDA_ARCH_LIST=" $TORCH_CUDA_ARCH_LIST ;6.0;6.1;7.0;7.5;8.0;8.6;9.0"
73
+ TORCH_CUDA_ARCH_LIST=" $TORCH_CUDA_ARCH_LIST ;6.0;6.1;7.0;7.5;8.0;8.6;9.0"
74
74
# for cuda 11.8 we use cudnn 8.5
75
75
# which does not have single static libcudnn_static.a deliverable to link with
76
76
export USE_STATIC_CUDNN=0
77
77
# for cuda 11.8 include all dynamic loading libraries
78
78
DEPS_LIST=(/usr/local/cuda/lib64/libcudnn* .so.8 /usr/local/cuda-11.8/extras/CUPTI/lib64/libcupti.so.11.8)
79
79
fi
80
+ if [[ -n " $OVERRIDE_TORCH_CUDA_ARCH_LIST " ]]; then
81
+ TORCH_CUDA_ARCH_LIST=" $OVERRIDE_TORCH_CUDA_ARCH_LIST "
82
+ fi
83
+ export TORCH_CUDA_ARCH_LIST=" $TORCH_CUDA_ARCH_LIST "
80
84
export NCCL_ROOT_DIR=/usr/local/cuda
81
85
export USE_STATIC_NCCL=1 # links nccl statically (driven by tools/setup_helpers/nccl.py, some of the NCCL cmake files such as FindNCCL.cmake and gloo/FindNCCL.cmake)
82
86
0 commit comments