Making CUDA available in pytorch

I’m trying to make cuda available to pytorch, i.e., I would like the following line of python to return ‘True’: torch.cuda.is_available(). It currently returns the following:

/usr/lib/python3.13/site-packages/torch/cuda/init.py:182: UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 12090). Please update your GPU driver by downloading and installing a new version from the URL: Download The Latest Official NVIDIA Drivers Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at /build/python-pytorch/src/pytorch-cuda/c10/cuda/CUDAFunctions.cpp:119.)
return torch._C._cuda_getDeviceCount() > 0
False

Torch is installed via the python-pytorch-cuda package, which requires cuda 13.

import torch
print (torch.version.cuda)
13.0

I’m running the nvidia 575 drivers, which nvidia-smi shows support for cuda 12.9.

If I upgrade the nvidia drivers to 580, cuda is available. However, per the current upgrade notice, the system is otherwise completely unsuable with constant screen flicker and failed window refreshes.

Any suggestions as to how I can make with work without doing a custom install of pytorch or other hackery?

Isn’t that just a heads up and notice for

?

I just read here - I do not have NVIDIA hardware.

But your interpretation of the notice seems to be inaccurate.

The notice also says “current 580xx driver seems to be super unstable”. I’m not sure what you think I’m mischaracterizing?

I didn’t say “mischaracterize”.
I referred to your interpretation of an information that something might not work as expected.

Did you try and discover that that notice applied to you?
Or did you not - and just assumed that it would apply to you? :wink:

As already said:
I cannot confirm or deny any of this from experience - I do not have NVIDIA hardware.

I’m simply following the logic of what was said.

Yes, I upgraded to the 580 drivers and my system was unusable so I downgraded to 575.

I’ve got no more bright (or not so bright) ideas then … :man_shrugging:

1 Like

@jmac While I’d like to help out, I can’t read anything because the lack of proper formatting in your post.

Please help us help you and provide more information in general as well as abide by the following:

1 Like

@jmac

Please also provide your system information, according to forum guidelines and as described (below), in case it’s useful to those wishing to help.

Regards.



System Information

While information from *-fetch type apps might be fine for someone wishing to buy your computer, for Support purposes it’s better to ask your system directly; :eyes:

Output of the inxi command (with appropriate parameters, and formatted according to forum guidelines) will generate information useful for those wishing to help:

Suggested inxi command (use either):

inxi -zv8 (short-form)
inxi --filter --verbosity=8 (long-form)
inxi man pages (manual)
Running `inxi` within a `chroot` environment
  • Add --color=0 to the long-form command, or…
  • Change the short-form command to inxi -zv8c0
Your privacy is respected
1 Like

I suppose you can wait for 580 to become usable, or perhaps use a different GPU (I’m on 580 and haven’t noticed any issues, but I’m on unstable and haven’t updated in 3 weeks so I’ve still got a working version: 580.105.08-3).


You’re probably best looking into a custom install anyway, a lot of AI stuff tends to move slower than a rolling release does.

There’s AUR (en) - python-pytorch-cuda12.9 - presumably you’d use it with a venv, but you haven’t given us any details so we can’t be more specific. :man_shrugging: