3

Is cuda already included in the installation of the graphics card display driver? The card has 192 cuda cores according to https://www.asus.com/Graphics-Cards/GT710-SL-2GD5/specifications/, and Cuda 3.5 according to https://www.techpowerup.com/gpu-specs/geforce-gt-710.c1990. It obviously supports cuda, thus I was expecting this to be already installed.

Coming from https://stackoverflow.com/questions/9727688/how-to-get-the-cuda-version to find out the cuda version. The shortcuts for Windows 10 of that link do not work for me.

I assume now that cuda needs to be installed separately from https://developer.nvidia.com/cuda-toolkit, is this true?

questionto42
  • 1,861
  • 3
  • 21
  • 52
  • 1
    When you ran in the general nVidia display drivers, did you choose typical or custom? If you went for custom, I believe you can tick CUDA from there. Maybe re-run the install from the GeForce utility/downloaded GPU drivers. https://www.nvidia.co.uk/Download/driverResults.aspx/162226/en-uk – spikey_richie Jul 29 '20 at 12:41
  • @spikey_richie I have checked this. In the custom menu, there is no choice to install cuda (using exactly the given link). You get the choice of 4 checkboxes, which are all checked and obvious. – questionto42 Jul 29 '20 at 13:17
  • 1
    Checking the release notes from that link above (comment 1), that installer includes CUDA v11.0 – spikey_richie Jul 29 '20 at 13:57
  • 1
    @spikey_richie You must be right, I do find cuda files in `C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common` and `C:\Program Files (x86)\NVIDIA Corporation\PhysX\Engine\73BE2921551D\ImplicitLibs`. Then I do not know how to check the cuda version. I have dropped the comment at https://stackoverflow.com/questions/9727688/how-to-get-the-cuda-version. – questionto42 Jul 29 '20 at 14:27

1 Answers1

5

Result in advance:

  • Cuda needs to be installed in addition to the display driver unless you use conda with cudatoolkit or pip with cudatoolkit.
  • Tensorflow and Pytorch need the CUDA system install if you install them with pip without cudatoolkit or from source.
  • Tensorflow and Pytorch do not need the CUDA system install if you use conda (recommended). The conda install command for Pytorch will need the conda install parameter "cudatoolkit", while tensorflow does not need the parameter.

In the following, "CUDA Toolkit" (standalone, what you would install outside of Python right on your system) and cudatoolkit (conda) are different!

EDITED: I found an example of what was also commented: that pip sometimes works when conda does not. UnsatisfiableError: Finds incompatible specification for CUDA driver, even though I have the version in the specification, and pip installs fine - installing PyMC3 and tensorflow. Old example perhaps, but a hint. Thus: try conda, and only if that does not work, try pip.

####

Details (only fyi):

Why not just testing an installation that needs cuda to find out. Going to https://pytorch.org/get-started/locally/, you get conda install pytorch torchvision cudatoolkit=10.2 -c pytorch as the installation command in conda prompt. It chooses to install version 10.2. It would not install cuda if that came with the display driver.

The installation then installs a cuda toolkit:

The following NEW packages will be INSTALLED:

cudatoolkit pkgs/main/win-64::cudatoolkit-10.2.89-h74a9793_1

Then we see that the cudatoolkit-10.2.89 | 317.2 MB is probably too large to be plausibly included in the display driver. In C:\Program Files (x86)\NVIDIA Corporation, there are only three cuda-named dll files of a few houndred KB.

p.s.: The mentioned cuda 11.0 in the release notes is just giving us the support information, not the actual installation. I have had a look at the release notes as well. It lists cuda 11.0 under "Software Module Versions", yes. Yet later under "New Features and Other Changes" it just says "Supports CUDA 11.0.", see https://us.download.nvidia.com/Windows/451.67/451.67-win10-win8-win7-release-notes.pdf.

From https://stackoverflow.com/questions/9727688/how-to-get-the-cuda-version:

  • The accepted answer states that you need to install nvidia-cuda-toolkit to run the version commands at all (though referring not to Windows, but it is the same on Windows).
  • The answer of using nvidia-smi to get the version in the top right is rejected as wrong since it only shows which version is supported. It does not show if Cuda is actually installed. @BruceYo comments: [The command nvidia-smi] "will display CUDA Version even when no CUDA is installed."

This suggests again that cuda is not included in the display driver installation.

questionto42
  • 1,861
  • 3
  • 21
  • 52
  • 1
    The first time I read this answer it kinda made sense... but the more I'm learning, the more I find it incorrect. You say we can either: 1. use conda to install cudatoolkit + packages like torch, or 2. we can manually install cuda using the file downloaded from nvidia, and install software like torch using pip... By saying this, I think you are implying that pip will not also install cuda-toolkit when install torch (as opposed to conda) correct? Well if so, that's wrong! `pip install torch` will include cudatoolkit too! See the filenames @ https://download.pytorch.org/whl/torch_stable.html – Redoman Mar 29 '22 at 13:24
  • @JfredoJ Good point! Perhaps also changed in newer versions? I will change it. The message is right, though: do not use pip. Use conda. I was a beginner, there were wrong hints everywhere in 2020. For example, I tried an install from source, took me weeks, no working guides anywhere. With pip, you *can* use the official Cuda Toolkit, with conda, it *must be* cudatoolkit. Better use conda with the cudatoolkit, even if that normally lags behind Cuda Toolkit. NVIDIA does not recommend pip + Cuda Toolkit nor cudatoolkit with it, handling dependencies with pip can become a tricky task. – questionto42 Mar 29 '22 at 17:14
  • 1
    In my case installing using pip was the only option, as conda would install a cuda toolkit too old for my GPU. I didn't find it so complicated or frustrating though: all I had to do is: `pip3 install torch==1.11.0+cu115 torchvision==0.12.0+cu115 torchaudio===0.11.0+cu115 -f https://download.pytorch.org/whl/torch_stable.html` – Redoman Apr 01 '22 at 11:24
  • 1
    @JfredoJ Yes, see also [How to run pytorch with NVIDIA "cuda toolkit" version instead of the official conda "cudatoolkit" version?](https://stackoverflow.com/questions/63163178/how-to-run-pytorch-with-nvidia-cuda-toolkit-version-instead-of-the-official-co). Yet, see this quote from the official [pytorch "Install Locally" site](https://pytorch.org/get-started/locally/) right in the first block: `Anaconda is our recommended package manager since it installs all dependencies.` If your project uses a big stack of packages over longer time, that can lead to some extra work. – questionto42 Apr 01 '22 at 16:16
  • 1
    That's the theory! Then there's practice :) Being myself new to Python/Anaconda I've been already exposed to the *try conda first!* mantra and I stuck to that from the start! I would replace pip for conda even in experimental code I would follow through until this hit me hard, right when I tried installing pytorch. Following the official instructions I was using conda like there's no tomorrow :) only to find out days of frustration later that my GPU required a more recent cuda toolkit which could only be installed using pip. Since then I learnt that one is not *always* better than the other! – Redoman Apr 02 '22 at 09:46
  • @JfredoJ You are likely wrong, your card does not require the latest version. What is written on the card as CUDA Toolkit is not what you must install, it is just what you *can*. You can use pip and use the latest CUDA Toolkit only to have that latest version, yet, this is - again - not recommended by neither pytorch nor tensorflow. Imagine you open your project in a year, or you install a load of 100 modules: after some time, you might not be able to just install with pip without having to solve version dependencies. – questionto42 Apr 02 '22 at 14:34
  • 1
    You don't understand. Those are not my assumptions, it's facts. Torch will NOT work properly on my GPU if I install (using conda) a version of it which comes with a Cuda Toolkit version lower than a certain number. The worst thing is, it will fail silently, not reporting any errors but just causing NaN values on Tensors. This took me a good amount of sanity to debug. And was confirmed by other sources. In my case (and probably in many others) conda is not the solution... Stop praising it like a religion... Conda is just a good tool, but like I said it's not always the most appropriate one. – Redoman Apr 02 '22 at 15:46
  • @JfredoJ conda comes with cudatoolkit, not with Cuda Toolkit. That you do not seem to know this difference makes your sayings already less likely to be true. And if it is like you say it, just add an answer here, with your card and links that prove what you say. At this moment, you stand against the two official guides. I am not praising anything. I am not a professional anyway, I just show what I found, and you can show that things might have changed with the newer cards. – questionto42 Apr 02 '22 at 18:52
  • Ah, your very strong point is that because I wrote Cuda Toolkit in place of cudatoolkit I don't know what I am saying, right? Lol, just grow up man, you're taking this on a personal level while trying to belittle my knowledge on the basis of some word spelling just because you need to be right at all costs? How pathetic is that? ... I don't need to prove you anything, I'm not on trial and you're nobody's court. Had you been able to keep this constructive I'd have given you all the info, but the way you failed at it made you loose whatever recognition you had as an interlocutor. Now bye. – Redoman Apr 03 '22 at 01:30
  • @JfredoJ Misunderstanding, this was 0 % personal. And this is not about a spelling mistake. It is not likely that a new NVIDIA card cannot use the conda pytorch installer and yes, you should not make such a writing mistake when it is all about `Cuda Toolkit` or `cudatoolkit`. This is the constructive way to go. I am just repeating what is in the guides, I am not the judge since you can add an answer with proofs which is half of the work. You may downvote it then. Finding answers is up to the community. Perhaps someone else will share an answer of what you said then. – questionto42 Apr 03 '22 at 09:22
  • 1
    I found an example of what @Redoman commented: where pip works, but conda does not. [UnsatisfiableError: Finds incompatible specification for CUDA driver, even though I have the version in the specification, and pip installs fine - installing PyMC3 and tensorflow](https://github.com/conda/conda/issues/9868). Old example perhaps, but a hint. – questionto42 Aug 02 '22 at 16:05