Problem with CUDA Installation

Hi

CUDA calculations do not work on my system. I think I’m missing an important point somewhere, but I can’t find the error. Can you guys help me with this?

Here are the steps I take for the installation:

  • Reset Windows 10 Home (64bit - Build 10.0.18.363) and install the latest Updates => OK.

  • Is the graphics card CUDA compatible? => OK (GeForce GTX 570 Compute Capability 2.0).

  • Download and install the latest graphics card driver. Use the custom installation, install only the “Graphics Driver” and use the option “Perform a clean installation)”. => OK (Version 391.35)

  • Download and install Python 3.7.6 amd64. Activate ALL possible options, which are available during the “Customize installation” => OK.

  • Update PIP in CMD: “python -m pip install --upgrade pip” => OK.

  • Open the UAC-SettingS in CMD “C:\WINDOWS\System32\UserAccountControlSettings.exe” and set to “Never notify” => OK.

  • Install Pytorch in CMD “pip3 install torch===1.3.1 torchvision===0.4.2 -f https://download.pytorch.org/whl/torch_stable.html” => OK.

  • Install Microsoft Visual Studio Community 2019 (16.4.2), Select “Desktop development with C++” at Workloads with default Toolset 14.24 . Start VS once. => OK.

  • Open in a editor “C:\Program Files\Python37\Lib\site-packages\PIL_init_.py” and add at line 25 this text => OK.
    PILLOW_VERSION = ‘2.6.1’
    VERSION = ‘1.1.7’

  • Install Anaconda (Anaconda3-2019.10-Windows-x86_64) in “All Users”. Do not activate the two checkboxes in “Advanced Options” => OK.

  • Install CUDA (cuda_10.1.105_418.96_win10) with the “Express” installation option => OK.

  • Copy cuDNN-Files (cudnn-10.1-windows10-x64-v7.6.5.32) to the folders in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1 => OK.

  • Install dependencies according the manual “conda install numpy ninja pyyaml mkl mkl-include setuptools cmake cffi typing” => OK.

  • Install dependencies that are necessary for my project in cmd “pip install matplotlib tqdm opencv-python pandas scikit-image scikit-learn transformers”

  • Add variables in CMD = OK.
    set DISTUTILS_USE_SDK=1
    set CMAKE_GENERATOR_TOOLSET_VERSION=14.24
    set CMAKE_GENERATOR=Visual Studio 16 2019
    for /f “usebackq tokens=*” %i in ("%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -latest -property installationPath) do call “%i\VC\Auxiliary\Build\vcvarsall.bat” x64 -vcvars_ver=%CMAKE_GENERATOR_TOOLSET_VERSION%
    set CUDAHOSTCXX=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\bin\Hostx64\x64\cl.exe

  • Add environment variables “path” in advanced system settings => OK.
    C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\libnvvp

  • Reboot and then check, if a CUDA-device is available => Not OK. “FALSE”
    import torch
    torch.cuda.is_available()

The binaries with with their own CUDA, cudnn, etc. libraries, and won’t use your local CUDA installation.
Your GPU with compute capability 2.0 is not supported using the binaries, as the only cc>=3.7 is supported with the latest binaries.

Usually you would need to build PyTorch from source for an older GPU, but I’m not sure at the moment, if 2.0 is supported at all or if it’s too old.

1 Like

Thank you for the hint!! With a newer graphics card it worked immediately. Thanks a lot, no idea why I didn’t read that anywhere…

1 Like