Score:0

Which CUDA version should I install? Do they have back compatibility?

eg flag

This is the first GPU I am using and unfortunately, I am using Ubuntu 20.04 not easy easy Windows. I want to use my GPU (Nvidia Quadro 2000 1GB GDDR5) for very basic machine learning models. I've got a supercomputer from my university to train bigger models.

When I type nvidia-smi in my terminal I can see the following.

+---------------------------------------------+
| NVIDIA-SMI 390.144                Driver Version: 390.144                   |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Quadro 2000         Off  | 00000000:01:00.0  On |                  N/A |
| 34%   62C    P0    N/A /  N/A |    383MiB /   963MiB |     20%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+---------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0       955      G   /usr/lib/xorg/Xorg                            93MiB |
|    0      1261      G   /usr/bin/gnome-shell                         143MiB |
|    0      3398      G   ...AAgAAAAAAAAACAAAAAAAAAA= --shared-files   142MiB |
+---------------------------------------------+

In other answers for example in this one Nvidia-smi shows CUDA version, but CUDA is not installed there is CUDA version next to the Driver version.

I want to download Pytorch but I am not sure which CUDA version should I download. Or should I download CUDA separately in case I wish to run some Tensorflow code. BTW I use Anaconda with VScode.

I found an old article which says my GPU supports CUDA 2.1. Are the newer versions back-compatible?

As per Nmath's suggestion, I went on to install CUDA from the Ubuntu repository as follows.

$ sudo apt install nvidia-cuda-toolkit

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been                Recommends: nvidia-visual-profiler (= 10.1.243-3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.oing to be installed
                       Recommends: nvidia-visual-profiler (= 10.1.243-3) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Here, I do understand that it need some dependencies. How do I fix it?

ChanganAuto avatar
us flag
`nvidia-visual-profiler` is at the multiverse repository. Make sure you have it enabled. Open Software & Updates to confirm and act accordingly.
Prakhar Sharma avatar
eg flag
@ChanganAuto Yes, Software restricted by copyright or legal issues (multiverse) is already checked in Software and Updates.
cc flag
Check the CUDA compute capability requirements on any software you want to install. My 2GB Quadro 1000 (cc=2.1 same as yours) was limited to CUDA 8.x for my DNN and Tensorflow.
Prakhar Sharma avatar
eg flag
@ubfan1 Yes. the CUDA toolkit 9.0 supports my driver version (from nvidia-smi). Still when I install an older version of Pytorch that supports CUDA 9.0, Still torch.cuda.is_available() is False. Please see this question: https://askubuntu.com/q/1383692/1230667
Score:1
ng flag

Don't overthink this. Just use the version of CUDA that is in repos for your version of Ubuntu. Unless you have a very specific technical reason for doing so, you shouldn't need to install a specific version, especially not one that isn't in Ubuntu's repositories. This is as true with CUDA as it is any other software. Think about this: why would developers release new versions of software that stop supporting features and hardware that most people are still using?

In fact, if you try to explicitly install software versions (especially older ones) that are different than what's in Ubuntu's repositories, this is often a recipe for disaster as lots of software in Ubuntu/Linux rely on dependencies and expect the version that is in official repositories.

Prakhar Sharma avatar
eg flag
Thanks for the reply. I am getting some errors. I've updated the answer.
Nmath avatar
ng flag
Did you run `sudo apt update` and `sudo apt upgrade` first? You need to be up-to-date on maintenance and your package management system can't be broken before installing anything new. This is a very different problem than the question you asked here. See: https://askubuntu.com/q/223237
Prakhar Sharma avatar
eg flag
yes I did run the update and upgrade command first.
Nmath avatar
ng flag
`you have held broken packages` indicates that those commands would have had problems that need to be fixed first. Add the full output of each to your question
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.