GPU not available with tensorflow ad Torch in Ubuntu 18.04

Viewed 25

I have a trouble with my GPU since it is not available in Tensorflow neither in Torch.

import tensorflow as tf
device_name = tf.test.gpu_device_name()
if device_name != '/device:GPU:0':
    print('The device name is: ',device_name)  
    --> print : The device name is: '' # the device_name returned is empty 
else:
    print("GPU available")  

Here is the version CUDA

$ nvcc --version
--> nvcc: NVIDIA (R) Cuda compiler driver
--> Copyright (c) 2005-2022 NVIDIA Corporation
--> Built on Tue_May__3_18:49:52_PDT_2022
--> Cuda compilation tools, release 11.7, V11.7.64
--> Build cuda_11.7.r11.7/compiler.31294372_0

The version of NVIDIA

nvidia-smi
--> NVIDIA-SMI 515.65.01    Driver Version: 515.65.01    CUDA Version: 11.7

the version of tensorflow-gpu

import tensorflow as tf
print(tf.__version__) 
--> 2.0.0

I read that CUDA version 11.7 can match with NVIDIA 515.65.01. Any idea please ?

0 Answers
Related