GPU device not found in Colab (likely due to most recent TF 2.0 update)
See original GitHub issueMy code worked well with GPU in Colab yesterday. But this morning it became very slow. So I suspect that CPU is used despite hardware accelerator is set to GPU in “change runtime type” explicitly. The following test code result in “SystemError: GPU device not found”.
code chunk:
%tensorflow_version 2.x
import tensorflow as tf
device_name = tf.test.gpu_device_name()
if device_name != '/device:GPU:0':
raise SystemError('GPU device not found')
print('Found GPU at: {}'.format(device_name))
the same problem has be replicated by other users when I reported the issue to TF team: https://github.com/tensorflow/tensorflow/issues/34385. I posted it here because I think Colab can solve the problem by simply reverse the most recent update to TF 2.0 in their end. thank you.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:14 (3 by maintainers)
Top Results From Across the Web
Using Google Colab -- GPU Device not found error
:/ so far tried pip install tf-nightly-gpu and %tensorflow_version 2.x as it suggests after putting it @ the top -- still not registering...
Read more >Tensorfow 2.2.0 on google colab - General Discussion
I would like to train the model using Google Colab, but when I install TFv2.2.0 on colab, it doesn't find the GPU. If...
Read more >TensorFlow with GPU - Colaboratory - Google Colab
Navigate to Edit→Notebook Settings; select GPU from the Hardware Accelerator drop-down. Next, we'll confirm that we can connect to the GPU with tensorflow:....
Read more >Intro to Google Colab - The Materials Project Workshop
Colab is a hosted python notebook service, based on Jupyter, ... for i in range(10): print(i**2). Colab ... n\n') raise SystemError('GPU device not...
Read more >Training a model for custom object detection (TF 2.x) on ...
Run !pip list|grep opencv to see the versions of OpenCV packages installed i.e. opencv-python , opencv-contrib-python & opencv-python-headless . The versions ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If you are using tensorflow 2.0 on Colab, we recommend using the bundled version, which you can enable with:
This will switch your tensorflow version to the current 2.X version built for Colab (see https://colab.research.google.com/notebooks/tensorflow_version.ipynb for details)
If you install external releases of tensorflow via
pip install tensorflow-gpu==2.0
or similar, it will install a pre-built binary that may not be compatible with the GPUs and drivers available in Colab’s runtime.Is this issue solved now ?
is
2.2.0-rc3
the right version ?