pytorch / pytorch/pytorch

cusparse deprecation warning in CUDA 13.0 inductor build

Open
#166,011 1 comment 0 reactions 0 assignees View on GitHub
module: ci module: sparse triaged
Dominant language
Python
Stars
103k
Forks
29.5k
PR merge metrics
PR metrics pending

Description

### 🐛 Describe the bug

We see deprecation warning from cusparse when adding inductor benchmark for CUDA 13.0 https://github.com/pytorch/pytorch/actions/runs/18479687252/job/52651819419

```
2025-10-13T22:52:38.5319310Z /usr/local/cuda/include/cusparse.h:434:47: error: ‘csric02Info_t’ is deprecated: The type will be removed in the next major release [-Werror=deprecated-declarations]
2025-10-13T22:52:38.5320882Z 434 | cusparseCreateCsric02Info(csric02Info_t* info);
2025-10-13T22:52:38.5321471Z | ^
2025-10-13T22:52:38.5322134Z /usr/local/cuda/include/cusparse.h:230:22: note: declared here
2025-10-13T22:52:38.5322918Z 230 | struct csric02Info* csric02Info_t CUSPARSE_DEPRECATED_TYPE;
```

We are not able to see the same deprecation warning internally, and was unable to reproduce with upstream build locally yet. Filing this issue to fix the deprecated API for cusparse.

Issue seemlingly comes from nvshmem as error is reported there

```
2025-10-13T22:52:38.5252684Z [5550/7693] Building CUDA object caffe2/CMakeFiles/torch_nvshmem.dir/__/torch/csrc/distributed/c10d/symm_mem/nvshmem_extension.cu.o
2025-10-13T22:52:38.5255078Z FAILED: caffe2/CMakeFiles/torch_nvshmem.dir/__/torch/csrc/distributed/c10d/symm_mem/nvshmem_extension.cu.o
2025-10-13T22:52:38.5288099Z /opt/cache/lib/nvcc -forward-unknown-to-host-compiler -DHAVE_MALLOC_USABLE_SIZE=1 -DHAVE_MMAP=1 -DHAVE_POSIX_FALLOCATE=1 -DHAVE_SHM_OPEN=1 -DHAVE_SHM_UNLINK=1 -DIDEEP_USE_MKL -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DUSE_EXTERNAL_MZCRC -DUSE_NVSHMEM -D_FILE_OFFSET_BITS=64 -Dtorch_nvshmem_EXPORTS -I/var/lib/jenkins/workspace/build/aten/src -I/var/lib/jenkins/workspace/aten/src -I/var/lib/jenkins/workspace/build -I/var/lib/jenkins/workspace -I/var/lib/jenkins/workspace/nlohmann -I/var/lib/jenkins/workspace/moodycamel -I/usr/local/cuda/include -isystem /var/lib/jenkins/workspace/build/third_party/gloo -isystem /var/lib/jenkins/workspace/cmake/../third_party/gloo -isystem /var/lib/jenkins/workspace/cmake/../third_party/tensorpipe/third_party/libuv/include -isystem /var/lib/jenkins/workspace/cmake/../third_party/googletest/googlemock/include -isystem /var/lib/jenkins/workspace/cmake/../third_party/googletest/googletest/include -isystem /var/lib/jenkins/workspace/third_party/protobuf/src -isystem /opt/conda/envs/py_3.10/include -isystem /var/lib/jenkins/workspace/third_party/XNNPACK/include -isystem /var/lib/jenkins/workspace/third_party/ittapi/include -isystem /var/lib/jenkins/workspace/cmake/../third_party/eigen -isystem /var/lib/jenkins/workspace/third_party/ideep/mkl-dnn/include/oneapi/dnnl -isystem /var/lib/jenkins/workspace/third_party/ideep/include -isystem /var/lib/jenkins/workspace/INTERFACE -isystem /var/lib/jenkins/workspace/third_party/nlohmann/include -isystem /var/lib/jenkins/workspace/third_party/concurrentqueue -DLIBCUDACXX_ENABLE_SIMPLIFIED_COMPLEX_OPERATIONS -Xfatbin -compress-all -DONNX_NAMESPACE=onnx_torch -gencode arch=compute_86,code=sm_86 -Xcudafe --diag_suppress=cc_clobber_ignored,--diag_suppress=field_without_dll_interface,--diag_suppress=base_class_has_different_dll_interface,--diag_suppress=dll_interface_conflict_none_assumed,--diag_suppress=dll_interface_conflict_dllexport_assumed,--diag_suppress=bad_friend_decl --expt-relaxed-constexpr --expt-extended-lambda -Xfatbin -compress-all -Xcompiler -Werror -Xcompiler -Wno-error=sign-compare -Wno-deprecated-gpu-targets --expt-extended-lambda -DCUB_WRAPPED_NAMESPACE=at_cuda_detail -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -DC10_NODEPRECATED -O3 -DNDEBUG -std=c++17 -Xcompiler=-fPIC -DMKL_HAS_SBGEMM -DMKL_HAS_SHGEMM -DTORCH_USE_LIBUV -DCAFFE2_USE_GLOO -rdc=true -U__CUDA_NO_HALF_OPERATORS__ -MD -MT caffe2/CMakeFiles/torch_nvshmem.dir/__/torch/csrc/distributed/c10d/symm_mem/nvshmem_extension.cu.o -MF caffe2/CMakeFiles/torch_nvshmem.dir/__/torch/csrc/distributed/c10d/symm_mem/nvshmem_extension.cu.o.d -x cu -rdc=true -c /var/lib/jenkins/workspace/torch/csrc/distributed/c10d/symm_mem/nvshmem_extension.cu -o caffe2/CMakeFiles/torch_nvshmem.dir/__/torch/csrc/distributed/c10d/symm_mem/nvshmem_extension.cu.o
```
Would also need to figure out the difference between internal and upstream CI to see why we could not reproduce the error.

cc @alexsamardzic @nikitaved @pearu @cpuhrsch @amjames @bhosmer @jcaip @seemethere @malfet @pytorch/pytorch-dev-infra @ptrblck @nWEIdia @eqy @atalman

### Versions
2.9.0 with CUDA 13.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.