How to activate google colab gpu using just plain python
It's just easier to use frameworks like PyTorch or Tensorflow.
If not, you can try pycuda or numba, which are closer to "pure" GPU programming. That's even harder than just using PyTorch.
I'm new to google colab.
I'm trying to do deep learning there.
I have written a class to create and train a LSTM net using just python - not any specific deep learning library as tensorflow, pytorch, etc.
I thought I was using a gpu because I had chosen the runtime type properly in colab.
During the code execution, however, I was sometimes getting the message to quit gpu mode because I was not making use of it.
So, my question: how can one use google colab gpu, using just plain python, without special ai libraries? Is there something like "decorator code" to put in my original code so that the gpu get activated?