Skip to content

Commit 792e935

Browse files
authored
[builder] Keep dot in CUDA_VERSION (pytorch#652)
As `pytorch-nightly/build.sh` depends on dot to determine TORCH_ARCH_LIST
1 parent 170bc96 commit 792e935

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

conda/switch_cuda_version.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,10 @@ rm -fr /usr/local/cuda
1818
ln -s "$CUDA_DIR" /usr/local/cuda
1919

2020
# Using nvcc instead of deducing from cudart version since it's unreliable (was 110 for cuda11.1 and 11.2)
21-
CUDA_VERSION_DOT=$(nvcc --version | sed -n 4p | cut -f5 -d" " | cut -f1 -d",")
22-
export CUDA_VERSION=${CUDA_VERSION_DOT/./}
21+
CUDA_VERSION=$(nvcc --version | sed -n 4p | cut -f5 -d" " | cut -f1 -d",")
2322
if [[ "$OSTYPE" == "msys" ]]; then
2423
# we want CUDNN_VERSION=8.1 for CUDA 11.2, not just 8
25-
if [[ "$CUDA_VERSION" == '112' ]]; then
24+
if [[ "$CUDA_VERSION" == '11.2*' ]]; then
2625
CUDNN_MAJOR=$(find /usr/local/cuda/ -name cudnn_version.h -exec grep 'define CUDNN_MAJOR' {} + | cut -d' ' -f3)
2726
CUDNN_MINOR=$(find /usr/local/cuda/ -name cudnn_version.h -exec grep 'define CUDNN_MINOR' {} + | cut -d' ' -f3)
2827
CUDNN_VERSION=$CUDNN_MAJOR.$CUDNN_MINOR

0 commit comments

Comments
 (0)