当前位置:   article > 正文

安装Tensorflow时出现cudart64_100.dll not found问题_tensorflow gpu安装后显示dll缺失

tensorflow gpu安装后显示dll缺失

报错cudart64_100.dll not found

其实问题是TensorFlow无法检测到你的GPU

问题描述如下
Could not load dynamic library 'cudart64_100.dll'; dlerror: cudart64_100.dll not found
笔者安装的是Tensorflow1.15.0 + Cuda 10.0版本
在测试过程中报错,有好多dll文件是没有的,但是我在安装路径C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin下
这些dll文件都是可以找到的,这就很奇怪
于是在CSDN上查找大佬们的解决办法
最终找到了有效办法,
把安装路径下报错缺少的dll文件依次复制到C:/Windows/System路径下
就没有报错了

(tf115) C:\Users\WW>python
Python 3.6.13 |Anaconda, Inc.| (default, Mar 16 2021, 11:37:27) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
2023-01-30 21:25:34.161853: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
2023-01-30 21:26:34.962188: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll
2023-01-30 21:26:35.893417: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: NVIDIA GeForce MX450 major: 7 minor: 5 memoryClockRate(GHz): 1.575
pciBusID: 0000:01:00.0
2023-01-30 21:26:35.893573: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
2023-01-30 21:26:35.919963: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_100.dll
2023-01-30 21:26:35.926710: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_100.dll
2023-01-30 21:26:35.929293: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_100.dll
2023-01-30 21:26:35.937256: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_100.dll
2023-01-30 21:26:35.945978: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_100.dll
2023-01-30 21:26:35.964939: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll
2023-01-30 21:26:35.965175: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0
2023-01-30 21:26:35.966097: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2023-01-30 21:26:35.970792: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: NVIDIA GeForce MX450 major: 7 minor: 5 memoryClockRate(GHz): 1.575
pciBusID: 0000:01:00.0
2023-01-30 21:26:35.970860: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
2023-01-30 21:26:35.971304: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_100.dll
2023-01-30 21:26:35.971693: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_100.dll
2023-01-30 21:26:35.972066: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_100.dll
2023-01-30 21:26:35.972447: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_100.dll
2023-01-30 21:26:35.972864: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_100.dll
2023-01-30 21:26:35.973270: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll
2023-01-30 21:26:35.973723: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0
2023-01-30 21:26:36.676085: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2023-01-30 21:26:36.676184: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165]      0
2023-01-30 21:26:36.677172: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0:   N
2023-01-30 21:26:36.677955: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1262 MB memory) -> physical GPU (device: 0, name: NVIDIA GeForce MX450, pci bus id: 0000:01:00.0, compute capability: 7.5)
>>> print(sess.run(hello))
b'Hello, TensorFlow!'

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38

谁懂啊,我弄了好几个小时,读研可真他妈真累!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/神奇cpp/article/detail/828092
推荐阅读
相关标签
  

闽ICP备14008679号