Before reading the lines below, immediately change the runtime to use the GPU as hardware accelerator. This step is easily forgotten.
Now, we can begin :-)
CUDA comes already pre-installed in Google Colab. Some information on Google Colab are reported in the post “PyCUDA, Google Colab and the GPU”.