Hello, I’m using tensorflow 2.3.0 with jetpack 4.5.1.
I want to check if my GPU is properly loaded in tensorflow, so I executed “tf.config.list_physical_devices()” in python.
but it said “/proc/driver/nvidia/version does not exist.”, and it shows that GPU device is not in the list.
Here’s the message of executing the command:
Python 3.6.9 (default, Nov 25 2022, 14:10:45)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
2023-02-16 21:34:28.270428: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.10.2
>>> tf.config.list_physical_devices()
2023-02-16 21:35:22.127313: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2023-02-16 21:35:22.218903: E tensorflow/stream_executor/cuda/cuda_driver.cc:314] failed call to cuInit: CUDA_ERROR_UNKNOWN: unknown error
2023-02-16 21:35:22.219017: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (tom-b01): /proc/driver/nvidia/version does not exist
[PhysicalDevice(name='/physical_device:CPU:0', device_type='CPU'), PhysicalDevice(name='/physical_device:XLA_CPU:0', device_type='XLA_CPU')]
I first tried adding export CUDA_VISIBLE_DEVICES=1 to my .bashrc file then do source .bashrc, but unfortunately it didn’t work. Then I also tried 0 and 2, but they also didn’t work, too.
Then I tried using sdkmanager. Because I’m using windows, I went through a lot of trouble using wsl2. I think the part I’m worried about is that I edited my /usr/lib/os-release to make sdkmanager think i’m using ubuntu 18.04. But at last it can download the components. But after download done, when installing “File System and OS”, it said:
ERROR: File System and OS - target_image: E: Package 'python' has no installation candidate
So I entered the command: sudo apt install python2
But I can’t access python2 by entering python.
So I added an alias: alias python="python2"
I opened my console and check if python worked, and it’s properly working.
So I restarted sdkmanager and tested if it can properly install and flash now, but I got no luck. Still the same problem.
Here’s the exported logs, hope it helps.
Apparently, SDK manager does not work on Ubuntu 20.04.
After I installed Ubuntu 18.04 on wsl2, the problem solved. And now my jetson nano jetpack version is 4.6.3 and have TF 2.4.0 installed.