Skip to content

Commit b5527e4

Browse files
committed
Link conda packages with cusparselt
Fixes pytorch/pytorch#115085 (cherry picked from commit c55c58b)
1 parent 31d77df commit b5527e4

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

conda/build_pytorch.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,6 @@ for py_ver in "${DESIRED_PYTHON[@]}"; do
356356
PYTORCH_GITHUB_ROOT_DIR="$pytorch_rootdir" \
357357
PYTORCH_BUILD_STRING="$build_string" \
358358
PYTORCH_MAGMA_CUDA_VERSION="$cuda_nodot" \
359-
USE_CUSPARSELT=0 \
360359
conda build -c "$ANACONDA_USER" \
361360
${NO_TEST:-} \
362361
--no-anaconda-upload \

conda/pytorch-nightly/build.sh

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,18 @@ fi
5353
if [[ -n "$build_with_cuda" ]]; then
5454
export TORCH_NVCC_FLAGS="-Xfatbin -compress-all"
5555
TORCH_CUDA_ARCH_LIST="5.0;6.0;6.1;7.0;7.5;8.0;8.6"
56-
export USE_STATIC_CUDNN=1 # links cudnn statically (driven by tools/setup_helpers/cudnn.py)
56+
export USE_STATIC_CUDNN=0 # link with cudnn dynamically
57+
export USE_CUSPARSELT=1 # link with cusparselt
5758

5859
if [[ $CUDA_VERSION == 11.8* ]]; then
59-
TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;3.7+PTX;9.0"
60-
#for cuda 11.8 we use cudnn 8.7
61-
#which does not have single static libcudnn_static.a deliverable to link with
62-
export USE_STATIC_CUDNN=0
63-
#for cuda 11.8 include all dynamic loading libraries
64-
DEPS_LIST=(/usr/local/cuda/lib64/libcudnn*.so.8 /usr/local/cuda-11.8/extras/CUPTI/lib64/libcupti.so.11.8)
60+
TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;3.7+PTX;9.0"
61+
#for cuda 11.8 include all dynamic loading libraries
62+
DEPS_LIST=(/usr/local/cuda/lib64/libcudnn*.so.8 /usr/local/cuda-11.8/extras/CUPTI/lib64/libcupti.so.11.8 /usr/local/cuda/lib64/libcusparseLt.so.0)
6563
elif [[ $CUDA_VERSION == 12.1* ]]; then
66-
# cuda 12 does not support sm_3x
67-
TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;9.0"
68-
# for cuda 12.1 we use cudnn 8.8 and include all dynamic loading libraries
69-
export USE_STATIC_CUDNN=0
70-
DEPS_LIST=(/usr/local/cuda/lib64/libcudnn*.so.8 /usr/local/cuda-12.1/extras/CUPTI/lib64/libcupti.so.12)
64+
# cuda 12 does not support sm_3x
65+
TORCH_CUDA_ARCH_LIST="$TORCH_CUDA_ARCH_LIST;9.0"
66+
# for cuda 12.1 we use cudnn 8.8 and include all dynamic loading libraries
67+
DEPS_LIST=(/usr/local/cuda/lib64/libcudnn*.so.8 /usr/local/cuda-12.1/extras/CUPTI/lib64/libcupti.so.12 /usr/local/cuda/lib64/libcusparseLt.so.0)
7168
fi
7269
if [[ -n "$OVERRIDE_TORCH_CUDA_ARCH_LIST" ]]; then
7370
TORCH_CUDA_ARCH_LIST="$OVERRIDE_TORCH_CUDA_ARCH_LIST"

conda/pytorch-nightly/meta.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ build:
9898
- _GLIBCXX_USE_CXX11_ABI # [unix]
9999
- MAX_JOBS # [unix]
100100
- OVERRIDE_TORCH_CUDA_ARCH_LIST
101-
- USE_CUSPARSELT
102101

103102
test:
104103
imports:

0 commit comments

Comments
 (0)