Thenjiwe kubheka
3 min readJun 29, 2021

Running CUDA 11 on Google Colab

Cuda is Nvidia’s framework for using GPU’s(Graphical Processing Units) to perform traditional gaming operations and in our case high performance computing for machine learning.

Most of us suffer from hardware limitations, and thankfully Google came to the rescue with Google Colab.

Step 1: On your favorite browser and type: https://colab.research.google.com/ this will show results for Google Colab.

Step 2 :Click on the link, open the notebook and click on New Notebook

File — New Notebook

Step 3: Requires us changing our settings to GPU as the default is None, simply navigate to Runtime, select change runtime type, then under hardware accelerate select GPU.

Runtime — Change Runtime Type — Hardware Accelerator — GPU

Step 4: We want to remove the old CUDA version that comes pre-installed with Colab. To remove it and refresh our environment. We need to type the following ;

Output.

Now we need to install the latest version of CUDA, which CUDA 11

Output

Let’s make sure our Colab is running CUDA 11, to check we will simply run the command;

Then we should get the following output;

We want the ability to run the NVCC command from our notebook, so we will type in;

The Output

So above we have installed the NVCC plugin and now we will load it.

Output

Our CUDA has been successfully installed to our Colab

Thenjiwe kubheka
Thenjiwe kubheka

Written by Thenjiwe kubheka

Software Engineer from South Africa, who loves mathematics. Fascinated by machines, plays around with a lot of data, constantly researching AI.

Responses (1)