赞
踩
CUDA的概念
RTX光追系统和CUDA的关系?
CUDA和CUDNN的关系?
1、CUDA官网下载:
https://developer.nvidia.com/cuda-downloads
环境变量中可以酌情考虑添加
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\lib\x64
2、CUDA版本查看
打开控制面板,或者Win+S进行搜索,进入NVIDIA控制面板 。
系统信息中可以看到CUDA的版本。
3、判断自己是否成功安装:
cmd中输入
nvcc -V
1、CUDNN官网下载
https://developer.nvidia.com/rdp/cudnn-archive
2、下载完后安装
把 C:\Users<username>\Downloads\cuda\bin\cudnn64_7.dll 复制到 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin
把 C:\Users<username>\Downloads\cuda\include\cudnn.h 复制到 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include
把 C:\Users<username>\Downloads\cuda\lib\x64\cudnn.lib 复制到 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\lib\x64
3、判断自己是否安装成功
import tensorflow as tf
import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
print(tf.__version__)
a = tf.constant(1.)
b = tf.constant(2.)
print(a+b)
print('GPU:', tf.test.is_gpu_available())
提示各种dll库找不到
Could not load dynamic library ‘cudart64_110.dll’;
Could not load dynamic library ‘cublas64_11.dll’;
Could not load dynamic library ‘cublasLt64_11.dll’;
Could not load dynamic library ‘cufft64_10.dll’;
Could not load dynamic library ‘curand64_10.dll’;
Could not load dynamic library ‘cusolver64_11.dll’;
Could not load dynamic library ‘cusparse64_11.dll’;
Could not load dynamic library ‘cudnn64_8.dll’;
附一张用开GPU优化跑的小数据MNIST的优化效果,快了将近两倍
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。