PyTorch on TPU now available in Colab

#1

See here:

In the next couple weeks I will look into implementing a callback to allow us to use fastai in TPU.

If this information is not enough to get you excited for TPUs, I have heard Kaggle is working on bringing TPUs to Kernels! :slight_smile:

2 Likes

(Michael Li) #2

PyTorch released some sample Colab Notebooks. I’ve tried it and it works, but when I try to port the code to my fast.ai notebook, it doesn’t seem to work. The fast.ai notebook still using CPU even I set the runtime to use TPU. What I thought could be the issue is when importing fast.ai, it still imports the PyTorch older version, thus the TPU won’t work, but I can’t be sure. Anyone here tried the same thing and get fast.ai work on TPU on Colab?

0 Likes

#3

There’s a lot of stuff to be careful regarding using fastai with TPU. I would recommend waiting until we develop a good way to easily use TPU with fastai. We might have a callback for using models on the TPU which I am trying to develop over here

0 Likes