Debian 12.
python3
import tensorflow as tf
gpus = tf.config.experimental.list_physical_devices(‘GPU’)
print("Num GPUs Available: ", len(gpus))
print(gpus)
:
E external/local_xla/xla/stream_executor/cuda/cuda_driver.cc:266] failed call to cuInit: CUDA_ERROR_UNKNOWN: unknown error
/home/viktor/cuda-samples/Samples/1_Utilities/deviceQuery/deviceQuery Starting…
CUDA Device Query (Runtime API) version (CUDART static linking)
cudaGetDeviceCount returned 999
→ unknown error
Result = FAIL
sudo dmesg | grep -i nvidia
[ 6.793973] nvidia: loading out-of-tree module taints kernel.
[ 6.793981] nvidia: module license ‘NVIDIA’ taints kernel.
[ 6.807570] nvidia: module verification failed: signature and/or required key missing - tainting kernel
Fooocus:
RuntimeError: CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero.
It started with the installation of libraries for neural networks. Before that, everything was fine.