posted on 2023-06-06 10:07 read(1091) comment(0) like(14) collect(2)
The cuda supported on my computer is 11.6
kCUDA Toolkit Archive | NVIDIA Developer
Enter the above webpage and find the suitable cuda
Double-click the exe file to install
Open Settings -> Advanced System Settings -> Environment Variables
The ones in the red box are added automatically by the system, and the ones in the blue box are not automatically added by the system in some cases, and need to be added manually. Pay attention to your own path when adding.
- NVCUDASAMPLES_ROOT C:\ProgramData\NVIDIA Corporation\CUDA Samples\v11.6
-
- NVCUDASAMPLES11_6_ROOT C:\ProgramData\NVIDIA Corporation\CUDA Samples\v11.6
win+R, enter cmd, enter nvcc --version to view the version number, enter set cuda to view the set environment variables
The download address is as follows, you need to register
https://developer.nvidia.com/rdp/cudnn-download before downloading
The following link has a version that suits you
cuDNN Archive | NVIDIA Developer
Unzip cuDNN to drive D
Copy the three folders to the cuda installation directory. The default installation path is
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6
- C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin
- C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\include
- C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\lib
- C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\libnvvp
win+R cmd to enter the installation directory, then enter extras\demo_suite, execute .\bandwidthTest.exe and .\deviceQuery.exe, and get the following figure.
When running the deep learning code, the following error occurs because the GPU version of torch was originally installed.
Enter the official website Start Locally | PyTorch
Select each configuration and copy the red line link
Open torch and torchvision to choose the version that suits you
Enter the path to execute pip
- pip install torch-1.12.1+cu116-cp38-cp38-win_amd64.whl
-
- pip install torchvision-0.13.1+cu116-cp38-cp38-win_amd64.whl
cuda is available, and the code can be executed normally
Author:Poison
link:http://www.pythonblackhole.com/blog/article/79743/a86da50410e660c9f8e4/
source:python black hole net
Please indicate the source for any form of reprinting. If any infringement is discovered, it will be held legally responsible.
name:
Comment content: (supports up to 255 characters)
Copyright © 2018-2021 python black hole network All Rights Reserved All rights reserved, and all rights reserved.京ICP备18063182号-7
For complaints and reports, and advertising cooperation, please contact vgs_info@163.com or QQ3083709327
Disclaimer: All articles on the website are uploaded by users and are only for readers' learning and communication use, and commercial use is prohibited. If the article involves pornography, reactionary, infringement and other illegal information, please report it to us and we will delete it immediately after verification!