Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get allocated GPU spec in Google Colab

Tags:

I'm using Google Colab for deep learning and I'm aware that they randomly allocate GPU's to users. I'd like to be able to see which GPU I've been allocated in any given session. Is there a way to do this in Google Colab notebooks?

Note that I am using Tensorflow if that helps.

like image 825
Alexander Soare Avatar asked Feb 19 '20 12:02

Alexander Soare


People also ask

What GPU is available in Google Colab?

Most notable is that the majority of free Colab sessions will initialize with a K80 GPU and 12 GB of RAM.


2 Answers

Since you can run bash command in colab, just run !nvidia-smi: enter image description here

like image 120
Vladimir Sotnikov Avatar answered Oct 01 '22 14:10

Vladimir Sotnikov


This makes it easier to read

!nvidia-smi -L 
like image 21
korakot Avatar answered Oct 01 '22 12:10

korakot