Hello,
Recently I updated CUDA version to 12.2 in my machine (Ubuntu 22.04).
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.104.05 Driver Version: 535.104.05 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce RTX 4050 ... On | 00000000:01:00.0 On | N/A |
| N/A 37C P8 1W / 60W | 21MiB / 6141MiB | 0% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 2031 G /usr/bin/gnome-shell 1MiB |
+---------------------------------------------------------------------------------------+
I installed pytorch in a conda virtual environment using the latest version:
conda install pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch-nightly -c nvidia
And, when I try to run import pytorch
I get the following error message:
ImportError: libcusparseLt.so.0: cannot open shared object file: No such file or directory
So, I checked checking inside /usr/local/cuda
with find -name libcusparse*
and I effectively don’t have that file.
./targets/x86_64-linux/lib/libcusparse.so.12.1.2.141
./targets/x86_64-linux/lib/libcusparse_static.a
./targets/x86_64-linux/lib/libcusparse.so
./targets/x86_64-linux/lib/stubs/libcusparse.so
./targets/x86_64-linux/lib/libcusparse.so.12
So my question is, should I install that file from the following url: cuSPARSELt Downloads | NVIDIA Developer ? Or is this an issue from pytorch? I ask this because I have another conda environment where I can actually run import torch
which I installed the 2023-09-25 by checking the list of conda revisions, without issues. However, if I run torch.cuda.is_available()
I get False
. Which is again weird because the first week of this month (October 2023) I didn’t have this issue. The only changes I remember are a package I installed via pip like pylabel. And I updated conda recently.