2020-08-2500:01:00.435756: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll 2020-08-2500:01:03.200442: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library nvcuda.dll 2020-08-2500:01:03.875290: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1716] Found device 0 with properties: pciBusID: 0000:01:00.0 name: GeForce MX150 computeCapability: 6.1 coreClock: 1.0375GHz coreCount: 3 deviceMemorySize: 2.00GiB deviceMemoryBandwidth: 37.33GiB/s 2020-08-2500:01:03.875660: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll 2020-08-2500:01:03.877846: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cublas64_10.dll'; dlerror: cublas64_10.dll not found 2020-08-2500:01:03.993896: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cufft64_10.dll 2020-08-2500:01:04.000945: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library curand64_10.dll 2020-08-2500:01:04.062328: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cusolver64_10.dll 2020-08-2500:01:04.063793: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cusparse64_10.dll'; dlerror: cusparse64_10.dll not found 2020-08-2500:01:04.064736: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudnn64_7.dll'; dlerror: cudnn64_7.dll not found 2020-08-2500:01:04.064970: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1753] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform. Skipping registering GPU devices... 2020-08-2500:01:04.066352: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. 2020-08-2500:01:04.077843: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x1f2523ef360 initialized for platform Host (this does not guarantee that XLA will be used). Devices: 2020-08-2500:01:04.078174: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version 2020-08-2500:01:04.078547: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1257] Device interconnect StreamExecutor with strength 1 edge matrix: 2020-08-2500:01:04.078731: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1263] b'hello'
Traceback (most recent call last): File “D:/pyfile/word4/yy.py”, line 3, in import tensorflow as tf File “D:\pyfile\word4\venv\lib\site-packages\tensorflow__init__.py”, line 24, in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File “D:\pyfile\word4\venv\lib\site-packages\tensorflow\python__init__.py”, line 52, in from tensorflow.core.framework.graph_pb2 import * File “D:\pyfile\word4\venv\lib\site-packages\tensorflow\core\framework\graph_pb2.py”, line 6, in from google.protobuf import descriptor as _descriptor File “D:\pyfile\word4\venv\lib\site-packages\google\protobuf\descriptor.py”, line 47, in from google.protobuf.pyext import _message ImportError: DLL load failed: 找不到指定的程序。
解决 tensorflow-gpu 2.1 出现错误 “Could not load dynamic library ‘cudart64_101.dll’
1 2 3
>>> import tensorflow as tf 2020-04-2214:19:56.862944: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamiclibrary'cudart64_101.dll'; dlerror: cudart64_101.dll not found 2020-04-2214:19:56.867965: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
(tensorflow1) C:\Users\Administrator>python Python 3.7.7 (default, May 62020, 11:45:54) [MSC v.191664 bit (AMD64)] :: Anaconda, Inc. on win32 Type "help", "copyright", "credits" or "license"for more information. >>> import tensorflow as tf 2020-06-2104:02:23.205171: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll >>> tf.compat.v1.disable_eager_execution() >>> hello = tf.constant('hello,tensorflow') >>> sess= tf.compat.v1.Session() 2020-06-2104:02:25.472006: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll 2020-06-2104:02:25.580727: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties: pciBusID: 0000:00:1e.0 name: Tesla T4 computeCapability: 7.5 coreClock: 1.59GHz coreCount: 40 deviceMemorySize: 14.85GiB deviceMemoryBandwidth: 298.08GiB/s 2020-06-2104:02:25.589145: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll 2020-06-2104:02:25.600717: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll 2020-06-2104:02:25.614987: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_10.dll 2020-06-2104:02:25.622689: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_10.dll 2020-06-2104:02:25.637295: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_10.dll 2020-06-2104:02:25.645685: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_10.dll 2020-06-2104:02:25.673263: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll 2020-06-2104:02:25.678463: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0 2020-06-2104:02:25.683543: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2 2020-06-2104:02:25.690563: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1555] Found device 0 with properties: pciBusID: 0000:00:1e.0 name: Tesla T4 computeCapability: 7.5 coreClock: 1.59GHz coreCount: 40 deviceMemorySize: 14.85GiB deviceMemoryBandwidth: 298.08GiB/s 2020-06-2104:02:25.701724: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_101.dll 2020-06-2104:02:25.705676: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_10.dll 2020-06-2104:02:25.711700: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_10.dll 2020-06-2104:02:25.716021: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_10.dll 2020-06-2104:02:25.720220: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_10.dll 2020-06-2104:02:25.724584: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_10.dll 2020-06-2104:02:25.732739: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll 2020-06-2104:02:25.738786: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1697] Adding visible gpu devices: 0 2020-06-2104:02:26.578678: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1096] Device interconnect StreamExecutor with strength 1 edge matrix: 2020-06-2104:02:26.583080: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] 0 2020-06-2104:02:26.586153: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] 0: N 2020-06-2104:02:26.591704: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1241] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 14239 MB memory) -> physical GPU (device: 0, name: Tesla T4, pci bus id: 0000:00:1e.0, compute capability: 7.5) >>> print(sess.run(hello)) b'hello,tensorflow'