gpu tensorflow-certification
Hi everyone. I am interested to take up the latest version of TensorFlow certification.
From the handbook above, I was required to install the following
- Python
v3.9
- Tensorflow
v2.13
I am currently using GPU 3070 ti, and as such I installed cuda v11.8
.
Issue
However, I met up with an issue
2023-10-08 19:19:28.718121: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2023-10-08 19:19:29.023876: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2023-10-08 19:19:29.025239: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-10-08 19:19:29.820897: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Python Version : 3.9.18 (main, Aug 25 2023, 13:20:14)
[GCC 11.4.0]
TF Version : 2.13.1
2023-10-08 19:19:30.663261: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:981] could not open file to read NUMA node: /sys/bus/pci/devices/0000:07:00.0/numa_node
Your kernel may have been built without NUMA support.
2023-10-08 19:19:30.663442: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1960] 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...
GPUs : []
But if I were to use Tensorflow v2.14
, it will be able to detect GPU
2023-10-08 21:37:24.423756: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:9342] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2023-10-08 21:37:24.423807: E tensorflow/compiler/xla/stream_executor/cuda/cuda_fft.cc:609] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2023-10-08 21:37:24.423821: E tensorflow/compiler/xla/stream_executor/cuda/cuda_blas.cc:1518] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2023-10-08 21:37:24.428031: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Python Version : 3.9.18 (main, Aug 25 2023, 13:20:14)
[GCC 11.4.0]
TF Version : 2.14.0
2023-10-08 21:37:25.547013: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:880] could not open file to read NUMA node: /sys/bus/pci/devices/0000:07:00.0/numa_node
Your kernel may have been built without NUMA support.
2023-10-08 21:37:25.549888: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:880] could not open file to read NUMA node: /sys/bus/pci/devices/0000:07:00.0/numa_node
Your kernel may have been built without NUMA support.
2023-10-08 21:37:25.549960: I tensorflow/compiler/xla/stream_executor/cuda/cuda_gpu_executor.cc:880] could not open file to read NUMA node: /sys/bus/pci/devices/0000:07:00.0/numa_node
Your kernel may have been built without NUMA support.
GPUs : [PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]
Python Code
I have attached my python code so as to print out the expected response above.
import tensorflow as tf
import sys
def check_gpu_resources() -> None:
print(f"GPUs : {tf.config.list_physical_devices('GPU')}")
def check_tensorflow_resources() -> None:
print(f"TF Version : {tf.__version__}")
def check_python_version()->None:
print(f"Python Version : {sys.version}")
if __name__ == "__main__":
check_python_version()
check_tensorflow_resources()
check_gpu_resources()
As such I will like to ask, for the examination, if v2.13
does not work, am I allowed to use Tensorflow v2.14
instead ?