linux查看cuda版本和cudnn版本

第一部分. 查看cuda 版本 

cat /usr/local/cuda/version.txt

第二部分. 查看cudnn 版本 

cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2

3. 进行 cudn的测试:

3.1 编译samples例子 
进入到Samples安装目录,然后在该目录下终端输入make,等待十来分钟(根据硬件配置不同,时间会有差别)。 


3.2 编译完成后测试 
可以在Samples里面找到 bin/x86_64/linux/release/ 目录,并切换到该目录 
运行 deviceQuery 程序,

sudo ./deviceQuery   # 这个文件编译成功后才能成功执行

查看输出结果,重点关注最后一行,Pass表示通过测试 

4. tensorflow中GPU的测试,python3版本:

import tensorflow as tf
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
import tensorflow as tf

print('tensorflow version: %s \n' %(tf.__version__))
print('tensorflow path: %s \n' %(tf.__path__))
print("GPU Available: %s \n" %( tf.test.is_gpu_available()))

5. 版本对应关系查看

ref:https://www.tensorflow.org/install/source#tested_source_configurations

如果是 `conda` 安装的,但是发现引入不进去,怎么办呢?


export LD_LIBRARY_PATH=~/anaconda3/envs/{YourEnv}/lib/:${LD_LIBRARY_PATH}

Fix Nvidia Apt Repository Public Key Error - jdhao's digital space

W: GPG error: Index of /compute/cuda/repos/ubuntu1804/x86_64 InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
E: The repository ‘Index of /compute/cuda/repos/ubuntu1804/x86_64 InRelease’ is no longer signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

RUN rm /etc/apt/sources.list.d/cuda.list
RUN rm /etc/apt/sources.list.d/nvidia-ml.list
RUN apt-key del 7fa2af80
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub

[cuda和cudnn版本对应的tensorflow-gpu版本错误说明与排查](cuda和cudnn版本对应的tensorflow-gpu版本错误说明与排查_cuda cudnn对应关系_yeler082的博客-CSDN博客)

  • 1
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

或许,这就是梦想吧!

如果对你有用,欢迎打赏。

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值