From 132ae8e6dd5e1a206dfb330eb7c94555f6eaaf9e Mon Sep 17 00:00:00 2001 From: Huy Do Date: Wed, 15 Oct 2025 01:45:37 +0000 Subject: [PATCH] Don't link with libnvToolsExt when building for 12.9 (#165465) This is to bring back this logic from https://github.com/pytorch/pytorch/pull/161916/files#diff-bf46b4a09ca67e50622bf84fefc0d11b584ffcc24ee6cc5019cf0fc7565d81a8L170. Building libtorch on 12.9 is failing otherwise https://github.com/pytorch/pytorch/actions/runs/18458531395/job/52610761895: ``` cp: cannot stat '/usr/local/cuda/lib64/libnvToolsExt.so.1': No such file or directory ``` Pull Request resolved: https://github.com/pytorch/pytorch/pull/165465 Approved by: https://github.com/atalman, https://github.com/malfet --- .ci/manywheel/build_cuda.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.ci/manywheel/build_cuda.sh b/.ci/manywheel/build_cuda.sh index 6ed38f8b25c6..2a822295e036 100644 --- a/.ci/manywheel/build_cuda.sh +++ b/.ci/manywheel/build_cuda.sh @@ -187,19 +187,22 @@ if [[ $CUDA_VERSION == 12* || $CUDA_VERSION == 13* ]]; then export USE_CUFILE=0 else DEPS_LIST+=( - "/usr/local/cuda/lib64/libnvToolsExt.so.1" "/usr/local/cuda/lib64/libcublas.so.12" "/usr/local/cuda/lib64/libcublasLt.so.12" "/usr/local/cuda/lib64/libcudart.so.12" "/usr/local/cuda/lib64/libnvrtc.so.12" "/usr/local/cuda/extras/CUPTI/lib64/libcupti.so.12") DEPS_SONAME+=( - "libnvToolsExt.so.1" "libcublas.so.12" "libcublasLt.so.12" "libcudart.so.12" "libnvrtc.so.12" "libcupti.so.12") + + if [[ $CUDA_VERSION != 12.9* ]]; then + DEPS_LIST+=("/usr/local/cuda/lib64/libnvToolsExt.so.1") + DEPS_SONAME+=("libnvToolsExt.so.1") + fi fi else echo "Using nvidia libs from pypi."