Кажется, тензорный поток не распознает мой графический процессор, как это исправить? - PullRequest
0 голосов
/ 04 мая 2020

Я установил tensorflow-gpu на свой новый компьютер и систему, и все отлично распознает мой графический процессор, для этого я попробовал на своем терминале:

Тест Nvidia:

nvcc  --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243

Однако, пытаясь узнать, распознает ли tenorflow GPU, который я пробовал:

Тест Tensorflow:

import tensorflow as tf
tf.test.is_gpu_available()

Результат:

2020-05-04 22:51:25.687188: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-05-04 22:51:25.687914: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1561] Found device 0 with properties: 
pciBusID: 0000:06:00.0 name: GeForce RTX 2060 SUPER computeCapability: 7.5
coreClock: 1.65GHz coreCount: 34 deviceMemorySize: 7.79GiB deviceMemoryBandwidth: 417.29GiB/s
2020-05-04 22:51:25.687956: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
2020-05-04 22:51:25.687972: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10
2020-05-04 22:51:25.687986: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10
2020-05-04 22:51:25.688002: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10
2020-05-04 22:51:25.688015: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10
2020-05-04 22:51:25.688029: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10
2020-05-04 22:51:25.688112: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudnn.so.7'; dlerror: libcudnn.so.7: cannot open shared object file: No such file or directory
2020-05-04 22:51:25.688124: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1598] 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-05-04 22:51:25.688160: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-05-04 22:51:25.688170: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1108]      0 
2020-05-04 22:51:25.688178: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1121] 0:   N 
False

С другой стороны, следуя предложение дано здесь . Я пробовал следующие команды:

Другой тест Tensorflow:

from tensorflow.python.client import device_lib
device_lib.list_local_devices() 

И получаю следующие журналы.

Мои журналы:

2020-05-04 22:53:35.486634: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-05-04 22:53:35.487357: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1561] Found device 0 with properties: 
pciBusID: 0000:06:00.0 name: GeForce RTX 2060 SUPER computeCapability: 7.5
coreClock: 1.65GHz coreCount: 34 deviceMemorySize: 7.79GiB deviceMemoryBandwidth: 417.29GiB/s
2020-05-04 22:53:35.487403: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
2020-05-04 22:53:35.487421: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10
2020-05-04 22:53:35.487436: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10
2020-05-04 22:53:35.487451: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10
2020-05-04 22:53:35.487464: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10
2020-05-04 22:53:35.487477: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10
2020-05-04 22:53:35.487564: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudnn.so.7'; dlerror: libcudnn.so.7: cannot open shared object file: No such file or directory
2020-05-04 22:53:35.487574: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1598] 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-05-04 22:53:35.487591: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-05-04 22:53:35.487598: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1108]      0 
2020-05-04 22:53:35.487604: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1121] 0:   N 
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 12034437465466050746
, name: "/device:XLA_CPU:0"
device_type: "XLA_CPU"
memory_limit: 17179869184
locality {
}
incarnation: 16469163198093824972
physical_device_desc: "device: XLA_CPU device"
, name: "/device:XLA_GPU:0"
device_type: "XLA_GPU"
memory_limit: 17179869184
locality {
}
incarnation: 5712734079173508475
physical_device_desc: "device: XLA_GPU device"
]

Tenorflow распознает мой графический процессор? Некоторые результаты говорят мне True, а другие - False. Пожалуйста, помогите.

Изменить

Другой тест, который я сделал:

import tensorflow as tf
tf.test.is_built_with_cuda()
True

Что здесь не так?

Ответы [ 2 ]

0 голосов
/ 05 мая 2020

Ваш GPU определяется, вы просто не все правильно установили. Вам нужен этот пост: Какие комбинации версий TensorFlow и CUDA совместимы? . Я думаю, что ваш cuda в порядке, но cudnn установлен неправильно, как видно из журналов.

0 голосов
/ 05 мая 2020

Tensorflow обнаруживает ваш графический процессор, но это не означает, что он полностью функционален.

Как вы можете видеть в журналах te, файл libcuddn lib. не установлен в системе.

Вы можете найти инструкции по установке этой библиотеки в официальной документации: https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html

Убедитесь, что вы также должны быть установлены все перечисленные там зависимости: https://www.tensorflow.org/install/gpu

...