After setting up hardware acceleration on google colaboratory, the GPU isn’t being used.
This happened today and is the case for all my notebooks.
To reproduce, enable GPU acceleration and try to run the 11 first cells of the vision doc page:https://docs.fast.ai/tutorial.vision
It takes hours. And a message show up saying that we are connected to GPU runtime yet not using GPU.
Due to the most recent release of pytorch installing the proper torchwheels based on your CUDA version isn’t quite automated yet for colab. As a result I would recommend using the following to install fastai and pytorch:
!pip install light-the-torch >> /.tmp
!ltt install torch torchvision >> /.tmp
!pip install fastai --upgrade >> /.tmp
(Run that in a cell)
It worked, thanks @muellerzr !
BTW, you can use the following code to quickly check if GPU is available.
assert torch.cuda.is_available(), "GPU not available"
I am experiencing an issue with Google Collab.
I too tried to run 11 first cells of the vision doc page:https://docs.fast.ai/tutorial.vision.
Also I tried to run the 01_intro_clean.ipynb - same results
once learn.fine_tune(1) is called it is stuck.
The torch.cuda.is_available() returns True, i.e. GPU is available.
A couple of weeks ago I runed all notebooks of the first part of the course and it worked fine.
@mgreenbe FWIW, I’m having this problem too:
01_intro.ipynb takes easily over an hour at the cell that runs
learn = cnn_learner(dls, resnet34, metrics=error_rate)
!pip show fastai shows
fastai is version
I also posted about this on another topic: Lesson 1 - Official topic
my problem has been somehow resolved.
I reloaded the notebooks from the github, and it started to work. I hope it may help you!
Hi Maxim – thanks for that news. My notebook is still not training quickly at all, despite trying the
kill -9 -1 reset, as well as Runtime -> Factory reset runtime.