tesnsorflow-gpu无法在GPU上运行

时间:2019-10-06 22:33:50

标签: python tensorflow

我是TensorFlow的新手,我正试图让它在我的GPU上运行。我已经通过anaconda中的'pip install TensorFlow-GPU'下载了TensorFlow 2.0.0。一旦运行代码,它就会显示流动的消息,然后继续运行,而不会出现错误或错误。

2019-10-06 16:08:51.134375: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
2019-10-06 16:08:56.413427: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll
2019-10-06 16:08:56.546125: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.65
pciBusID: 0000:26:00.0
2019-10-06 16:08:56.550678: I tensorflow/stream_executor/platform/default/dlopen_checker_stub.cc:25] GPU libraries are statically linked, skip dlopen check.
2019-10-06 16:08:56.554685: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0
2019-10-06 16:08:56.557874: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2019-10-06 16:08:56.564005: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.65
pciBusID: 0000:26:00.0
2019-10-06 16:08:56.569047: I tensorflow/stream_executor/platform/default/dlopen_checker_stub.cc:25] GPU libraries are statically linked, skip dlopen check.
2019-10-06 16:08:56.573274: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0
2019-10-06 16:08:57.158993: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-10-06 16:08:57.162297: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165]      0
2019-10-06 16:08:57.164866: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0:   N
2019-10-06 16:08:57.167763: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 8686 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2080 Ti, pci bus id: 0000:26:00.0, compute capability: 7.5)
Model: "sequential"

但是,一旦我转到任务管理器,它表明我正在使用0.1%的GPU和大约20%的CPU。我已经卸载了所有先前版本的TensorFlow,并且我确定它正在运行2.0.0。我不知道CUDA是什么以及如何使用它,所以我想那可能是我问题的根源。

tf.test.is_gpu_available()
tf.test.is_built_with_cuda()
tf.test.is_built_with_gpu_support()

以上所有代码均返回“ True”,这使我更加困惑。

感谢您的提前帮助!

0 个答案:

没有答案