Article directory
Win11 Home Edition-3050TI graphics card installation CUDA11.3
CUDA ToolKit installation
Check the graphics card driver version of your computer
Note that the computer graphics card is not NVIDIA. Ignore this step. Non-NVIDIA graphics cards cannot be installed with CUDA.
View the CUDA version supported by the graphics card driver
Is the CUDA version related to the graphics card model or the driver?
Generally, the driver version determines the upper limit of the CUDA version that can be used. For example, the new version of the graphics card driver can support the old CUDA runtime. However, old graphics cards may not be able to be updated to the latest graphics card drivers. For example, Fermi graphics cards can only be installed with 391 drivers, so only CUDA9.1 can be used. In addition, the graphics card hardware is related to CUDA compute capability. Of course, streaming multiprocessor can also be specified during compilation. The new architecture supports more features.
Here CUDA11.6 is the highest supported version of CUDA, which can be backward compatible, but be careful not to install CUDA higher than this version , and you can install multiple versions of CUDA, which can be 环境变量
changed to the CUDA you need to use Version
Check official documents (https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html)
cuda toolkit download
CUDAtoolkit download address (https://developer.nvidia.com/cuda-toolkit-archive) select the corresponding version number
According to the cuda version supported by pytorch I want to install , and the cuda version should be under the driver version of my own computer , choose to install cuda11.3
pytorch installation
current pytorch installation
past pytorch installation
Select the system download that matches your machine ( 建议选local,local相当于离线安装,相对稳定,network相当于下载器在线下载
)
cuda toolkit installation
After double-clicking to open the exe, the following interface is displayed
The path in the picture is only 该exe文件解压路径
, not the final installation path. After the installation is complete, the program will delete itself, so the last ** 程序安装路径
must not be 解压路径
under this **, otherwise abnormal problems will occur.
The program enters the installation interface after self-extraction
If it is the first time to install CUDA, select it 精简安装
, otherwise it is recommended 自定义安装
that when customizing the installation option, CUDA is a core component that must be installed
The installation path can be selected by yourself. The system defaults to the C drive of the system disk. In order to facilitate future management, it can be installed to other disks other than the system disk. However, ** ** is required, and subsequent environment variables 记住选择的路径
and CUDnn
all need to use this path
After the next step, an unsupported VS appears, which needs to be checked and installed.
I should have installed 11.6CUDA before, but the VS of 11.3 could not be installed, and the prompt in the figure below appeared, and the installation can be completed under normal circumstances
OK after the next step
Open the path C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\CUPTI\lib64 to see if there is anycupti64_2021.1.1.dll
This means that CUPT1 has succeeded
cuda toolkit settings
Check whether the path is added in the system variable, if not, you need to add it yourself
Check with the command line
nvcc --version 或 nvcc -V #查看当前cuda版本
set cuda #查看cuda系统变量
CUDNN installation
cuDNN download
The cuDNN address is as follows, but it should be noted that you need to register an account to enter the download interface. You can register with confidence.
Download interface after successful registration
You can use the following URL to view the adapted cuDNN
https://developer.nvidia.com/rdp/cudnn-archive
Here (https://developer.nvidia.cn/rdp/cudnn-archive)
select the corresponding version of cuDNN
cuDNN installation
cuDNN installation is called configuration more accurate, we first decompress the downloaded cuDNN, we will get the following files:
- cuDNN decompressed files
After downloading, I found that cudnn is not an exe file, but a compressed package. After decompression, there are three folders, copy the three folders to the next cuda的安装目录
.
The installation path of CUDA is shown in the previous screenshot, or open the environment variables of the computer to view, the default installation path is as follows:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3
The latter v11.3
is your own version number CUDA installation directory file:
- CUDA installation directory file:
When copying, you can see that in the CUDA installation directory, there is a folder with the same name as the decompressed cuDNN. Note here, don’t worry, just copy it directly. The configuration files in the folder with the same name after decompression of cuDNN will be added to the folder with the same name in the CUDA installation directory.
-
File after successful copy
Now everyone should be able to understand that cuDNN is actually just a patch of CUDA, which is optimized for deep learning operations. Then add the environment variable
cuDNN settings
- Add the following path to the path in the system environment variable (modify according to your own path)
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\include
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\lib
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.3\libnvvp
-
Verify that the installation was successful
After the configuration is complete, we can verify whether the configuration is successful. We mainly use the built-in deviceQuery.exe and bandwithTest.exe of CUDA. If it is run, it
Result = PASS
means that CUDA and CUDNN are successfully installed:
first, win+R to start cmd, and then cd toCUDA安装目录
...\extras\ demo_suite, and then execute bandwidthTest.exe and deviceQuery.exe respectively, you should get the following figure:
Difficult Problems
- If you still can't see CUDA in the task manager
Press Win+I to open the system settings, enter the system, display, graphics settings (at the bottom of the page) and
find that the hardware acceleration GPU plan is enabled, turn it off, and then restart it.
reference blog
[CUDA] cuda installation (windows version) https://blog.csdn.net/weixin_43848614/article/details/117221384