Last active
November 19, 2024 13:12
-
-
Save Quasimondo/7e1068e488e20f194d37ba80696b55d8 to your computer and use it in GitHub Desktop.
Revisions
-
Quasimondo revised this gist
Dec 30, 2020 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,7 +6,9 @@ Typcially it looks like this: 2020-12-30 17:31:42.150368: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1 2020-12-30 17:31:42.176643: E tensorflow/stream_executor/cuda/cuda_driver.cc:328] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected Here is a solution that currently seems to work on my system, with Cuda 11.0 and Tensorflow 2.4.0, you can try it if all the other 500 proposed fixes did not work for you: Add these two lines at the very top of your script BEFORE any call to "import tensorflow": @@ -15,3 +17,6 @@ device_lib.list_local_devices() That's all suddenly it works. I have no clue why. If that did not help, here are a few other things you can try: https://victorwyee.com/engineering/failed-call-to-cuinit-cuda-error-unknown/ -
Quasimondo revised this gist
Dec 30, 2020 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,12 @@ This is a dreaded error that seems pop up its ugly head again and again, in particular after upgrading CUDA or Tensorflow. Typcially it looks like this: 2020-12-30 17:31:40.829615: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0 2020-12-30 17:31:42.149768: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set 2020-12-30 17:31:42.150368: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1 2020-12-30 17:31:42.176643: E tensorflow/stream_executor/cuda/cuda_driver.cc:328] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected Here is a solution that currently seems to work on my system, with Cuda 11.0 and Tensorflow 2.4.0, you can try it if all the other 500 proposed fixes did not work for you: Add these two lines at the very top of your script BEFORE any call to "import tensorflow": -
Quasimondo created this gist
Dec 30, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ This is a dreaded error that seems pop up its ugly head again and again, in particular after uprading CUDA or Tensorflow. Typcially it looks like this: 2020-12-30 17:31:40.829615: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0 2020-12-30 17:31:42.149768: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set 2020-12-30 17:31:42.150368: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1 2020-12-30 17:31:42.176643: E tensorflow/stream_executor/cuda/cuda_driver.cc:328] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected Here is a solution that currently seems to work on my system, with Cuda 11-0 and Tensorflow 2.4.0, you can try it if all the other 500 proposed fixes did not work for you: Add these two lines at the very top of your script BEFORE any call to "import tensorflow": from tensorflow.python.client import device_lib device_lib.list_local_devices() That's all suddenly it works. I have no clue why.