I have a fresh install of Fedora 39 on a Laptop with GeForce GT 730M as the GPU.
I followed this guide to install the Nvidia drivers and Cuda packages with RPM Fusion: Nvidia Drivers
I also installed the cuDNN toolkit via this guide: Machine Learning Libraries
I chose this method of installation because of my older GPU. I do have to say that I have tried installing the drivers all through NVIDIA repos as well and it didn’t change anything.
After installing Tensorflow, tensorflow couldn’t find my GPU.
Because I installed the CUDA and cuDNN libraries through RPM Fusion, I don’t have the nvcc command. Not sure if it is related.
Here are the results for the following commands:
nvidia-smi
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.223.02 Driver Version: 470.223.02 CUDA Version: 11.4 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 N/A | N/A |
| N/A 43C P8 N/A / N/A | 0MiB / 983MiB | N/A Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
pip show tensorflow
Name: tensorflow
Version: 2.16.1
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: packages@tensorflow.org
License: Apache 2.0
Location: /usr/local/lib64/python3.12/site-packages
Requires: absl-py, astunparse, flatbuffers, gast, google-pasta, grpcio, h5py, keras, libclang, ml-dtypes, numpy, opt-einsum, packaging, protobuf, requests, setuptools, six, tensorboard, termcolor, typing-extensions, wrapt
Required-by:
pip show nvidia-cudnn-cu11
Name: nvidia-cudnn-cu11
Version: 8.9.6.50
Summary: cuDNN runtime libraries
Home-page: https://developer.nvidia.com/cuda-zone
Author: Nvidia CUDA Installer Team
Author-email: cuda_installer@nvidia.com
License: NVIDIA Proprietary Software
Location: /usr/local/lib/python3.12/site-packages
Requires: nvidia-cublas-cu11, nvidia-cuda-nvrtc-cu11
Required-by:
python3 -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
2024-03-13 20:25:24.253266: I external/local_tsl/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used.
2024-03-13 20:25:24.256168: I external/local_tsl/tsl/cuda/cudart_stub.cc:32] Could not find cuda drivers on your machine, GPU will not be used.
2024-03-13 20:25:24.297070: I tensorflow/core/platform/cpu_feature_guard.cc:210] 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.
2024-03-13 20:25:25.192678: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
2024-03-13 20:25:25.843974: I external/local_xla/xla/stream_executor/cuda/cuda_executor.cc:998] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero. See more at https://github.com/torvalds/linux/blob/v6.0/Documentation/ABI/testing/sysfs-bus-pci#L344-L355
2024-03-13 20:25:25.844650: W tensorflow/core/common_runtime/gpu/gpu_device.cc:2251] 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...
dnf list installed | grep cuda
libcudnn8.x86_64 8.0.4.30-1.cuda11.1 @nvidia-machine-learning
libcudnn8-devel.x86_64 8.0.4.30-1.cuda11.1 @nvidia-machine-learning
libnccl.x86_64 2.8.3-1+cuda11.2 @nvidia-machine-learning
libnccl-devel.x86_64 2.8.3-1+cuda11.2 @nvidia-machine-learning
xorg-x11-drv-nvidia-470xx-cuda.x86_64 3:470.223.02-1.fc39 @rpmfusion-nonfree
xorg-x11-drv-nvidia-470xx-cuda-libs.x86_64 3:470.223.02-1.fc39 @rpmfusion-nonfree
find /usr/lib* -name "libcuda*"
/usr/lib64/libcuda.so.470.223.02
/usr/lib64/libcuda.so.1
/usr/lib64/libcuda.so
Also it is not a SELinunx issue since I set it to permissive - and there is no error log from SELinux.