tf.test.is_gpu_available()) возвращает False

print(tf.test.is_gpu_available())
print(tf.test.is_built_with_cuda())

Возвращает

False
True

Tensorflow - 2.7.0 CUDA - 11.2

Что я сделал не так? Помогите


Ответы (1 шт):

Автор решения: MaxU

Следуйте гайду по установке Tensorflow + GPU

Software requirements

The following NVIDIA® software must be installed on your system:

  • NVIDIA® GPU drivers —CUDA® 11.2 requires 450.80.02 or higher.
  • CUDA® Toolkit —TensorFlow supports CUDA® 11.2 (TensorFlow >= 2.5.0)
  • CUPTI ships with the CUDA® Toolkit.
  • cuDNN SDK 8.1.0 cuDNN versions). (Optional) TensorRT 7 to improve latency and throughput for inference on some models.

Windows setup

See the hardware requirements and software requirements listed above. Read the CUDA® install guide for Windows.

Make sure the installed NVIDIA software packages match the versions listed above. In particular, TensorFlow will not load without the cuDNN64_8.dll file. To use a different version, see the Windows build from source guide.

Add the CUDA®, CUPTI, and cuDNN installation directories to the %PATH% environmental variable. For example, if the CUDA® Toolkit is installed to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0 and cuDNN to C:\tools\cuda, update your %PATH% to match:

SET PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin;%PATH%
SET PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\extras\CUPTI\lib64;%PATH%
SET PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\include;%PATH%
SET PATH=C:\tools\cuda\bin;%PATH%
→ Ссылка