Repository navigation
|
/home/zhaopingtai/miniconda3/envs/aihwkit/lib/python3.10/site-packages/torch/cuda/init.py:235: UserWarning: |
Replies: 2 comments 4 replies
|
What version of Pytorch and CUDA are you using? |
|
That warning is the core problem: the PyTorch you have installed was built for older CUDA architectures (up to sm_90) and does not include kernels for your GPU. The RTX 5060 (Blackwell, compute capability sm_120) needs a PyTorch built against CUDA 12.8 or newer. With an older build there is no kernel image for sm_120, so every CUDA operation fails even though the card is detected. There are two parts to getting aihwkit running on this GPU: 1. PyTorch. Install a CUDA 12.8 (or newer) build into your conda env: Then verify: You should see a cu128 version, 2. aihwkit's CUDA extension. aihwkit's GPU support is a compiled CUDA extension, so it also has to contain kernels for sm_120. The prebuilt GPU packages are compiled for a fixed set of architectures and generally do not include Blackwell yet, so on a 50-series card you will most likely need to build aihwkit from source against a CUDA 12.8+ toolkit, with the build configured to target the sm_120 architecture (passing the CUDA architectures to the CMake build, e.g. If you do not specifically need the analog GPU kernels, aihwkit also runs on CPU, which sidesteps the compatibility issue entirely while you sort out the GPU build. To confirm which build you currently have, it helps to post the output of: |



That warning is the core problem: the PyTorch you have installed was built for older CUDA architectures (up to sm_90) and does not include kernels for your GPU. The RTX 5060 (Blackwell, compute capability sm_120) needs a PyTorch built against CUDA 12.8 or newer. With an older build there is no kernel image for sm_120, so every CUDA operation fails even though the card is detected.
There are two parts to getting aihwkit running on this GPU:
1. PyTorch. Install a CUDA 12.8 (or newer) build into your conda env:
Then verify: