I installed CUDA toolkit v12.9, then uninstalled CUDA toolkit v13.0, deleted C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0, checked that no environment variables had this version, nvcc –-version gives
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Wed_Apr__9_19:29:17_Pacific_Daylight_Time_2025
Cuda compilation tools, release 12.9, V12.9.41
Build cuda_12.9.r12.9/compiler.35813241_0
and torch.__version__ gives ‘2.8.0+cu126’in my vitrual env. But when calling pip install ./causal-conv1d/ --no-build-isolationin the same virtual env, I find that the CUDA_HOMEvariable imported from torch.utils.cpp_extensionis C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v13.0.
Any idea on what could be the problem ? Any workaround ? If possible I would not want to change the code in every package that I use that relies on torch.utils.cpp_extension to get CUDA version.