当前位置:网站首页>Deep Learning - Install CUDA and CUDNN to implement GPU operation of tensorflow
Deep Learning - Install CUDA and CUDNN to implement GPU operation of tensorflow
2022-08-03 15:16:00 【Peace of mind】
活动地址:CSDN21天学习挑战赛
这里我使用的版本是 tensorflow 2.8.0 tensorflow-gpu 2.8.0

目录
Create a download directory folder
下载CUDA
查看NVIDIA 显卡支持的CUDA版本
- win+s 搜索 NVIDIA Console Panel并打开
2. 查看NVIDIASystem information for the control panel(System information is in the lower left corner of the image below)
After opening the system information window,First review and record in the display section驱动程序版本
我的版本是512.15
然后点击组件,查看支持的CUDA版本
Here my version is as follows11.6.127,下载11.6.1的CUDA
官网下载CUDA
- Bing或Google 搜索 CUDA 11.6.1 (Enter which version you want to download here CUDA 版本号)
2. 点击链接,进入官网下载页面(The web page may load slowly VPN可能会快)
After the page loads,页面如下:
This is based on the operating system currently used,选择Windows平台等信息
信息输入完成后,点击Download开始下载
Here my browser is set to determine the download save location for each download,So the following window will pop up,点击保存即可
安装CUDA
Create a download directory folder
First save the path in the software(自定义)处,创建CUDA和CUDA_program文件夹
运行下载的CUDA安装程序
- 点击之前下载好的cuda exe程序
这里Extract the file path selection created earlierCUDA文件夹,之后OK即可
After the progress bar is loaded,will enter the formalCUDA 安装程序
- 正式的CUDA 安装程序
After clicking Agree and Continue,Go to the License Agreement page
选择自定义安装,点击下一步,Go to the installed software option
The specific selection is as follows:
点击下一步,Enter the installation path selection page,The installation path here is selected previously createdCUDA_program路径
After browsing and modifying the path,点击下一步,开始安装
根据自己的选择,之后Next即可(这里我是选择了 I understand 然后Next)
开始安装
安装结束,下一步即可
下载CUDNN
确定CUDNN版本
There is currently no official website for it11.6的版本,retrieved from the network11.6的CUDA可以配置8.3.2的CUDNN
但是下载后,出现了一些dll找不到,之后下载了8.3.3的CUDNNFound to solve the previous problem
因此 11.6.1的CUDA配置 8.3.3的CUDNN
官网下载CUDNN
CUDA和CUDNNdownload results are different,CUDA是一个安装程序,而CUDNNIt is a compressed file
进入官网后,会需要登录NVIDIA账号,If you don't have it here, you can register
登录后,Various can be seenCUDNN版本
这里我们下载8.3.3 For CUDA 11.6的版本
复制CUDNN解压文件
Unzip the downloaded compressed package file,The unzipped folder contains the following files
将解压后的文件夹复制到CUDA安装目录的binthe same level of the folder and rename it to cudnn
这里我的是E:\SoftWares\PyCharm\CUDA_program路径下
添加环境变量
win+s输入环境变量,打开编辑系统环境变量
在系统环境变量Path中添加以下内容(Specifically, the folder in the red box,Configure according to your own installation directory)
下载缺失的zlibwapi.dll文件
打开官网,下载zlibwapi.dll文件
一般的浏览器,点击ZLIB DLL It will automatically jump to download;ChromeRequires right mouse click on the link,Select the link to save as to download
下载完成后解压,并将解压后的文件夹zlib123dllx64移动到系统盘C的Program Files (x86)文件夹中
在系统变量Path中添加环境变量:
判断是否安装成功
- cmd命令行输入 nvcc -V 命令,出现The following information is successful
- Pycharm运行下列脚本
from tensorflow.python.client import device_lib import tensorflow as tf print(device_lib.list_local_devices())输出中的device_type既有CPU,也有GPU则成功
- Run a neural network program
没有报错信息,能够正常epoch、Normal operation is successful
边栏推荐
- 身为程序员的我们如何卷死别人?破局重生。
- MMA安装及使用优化
- liunx服务器遇到SYN_SENT洪水攻击
- php中接口、抽象类以及接口和抽象类区别详解
- 问题4:什么是缺陷?你们公司缺陷的优先级是怎样划分的?
- 三元表达式实现多个条件的判断
- 问题10:注册页面的易用性测试?
- Clickhouse Filling the Pit 3: Left Join changed to Right Join, resulting in incorrect statistical results
- Taurus.MVC WebAPI 入门开发教程1:框架下载环境配置与运行(含系列目录)。
- 2021年12月电子学会图形化三级编程题解析含答案:分身术
猜你喜欢
随机推荐
交大医学院临床研究中心如何将 ModelWhale 应用于临床医生教学、研究丨数据科学 x 临床医学
问题7:功能测试花瓶用例
gocron定时任务管理系统的安装与运行
SQL 不新增表 把一张表定义成两张
STM32H743VIT6配置ADC为1M采样率
高等数学(第七版)同济大学 习题4-1 个人解答
今日睡眠质量记录75分
一文搞懂$_POST和php://input的区别
问题1:get和post的区别
A high-performance creation book, ASUS Dreadnought Pro15 2022 is completely enough for daily photo editing and editing!
冒烟测试冒烟测试
我现在推荐用mamba替代conda
手摸手带你完成智慧路灯构建及避坑【华为云至简致远】
2021年12月电子学会图形化四级编程题解析含答案:森林运动会
并发编程的核心问题
选择合适的 DevOps 工具,从理解 DevOps 开始
【FPGA教程案例44】图像案例4——基于FPGA的图像中值滤波verilog实现,通过MATLAB进行辅助验证
又有大厂员工连续加班倒下/ 百度搜狗取消快照/ 马斯克生父不为他骄傲...今日更多新鲜事在此...
Mysql 生成排序序号
20220801使用安信可的ESP-01S模块实现WIFI的UART传输功能







































