How to get allocated GPU spec in Google Colab
Question:
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.
Answers:
This makes it easier to read
!nvidia-smi -L
Run this two commands in collab
CUDA: Let’s check that Nvidia CUDA drivers are already pre-installed and which version is it.
!/usr/local/cuda/bin/nvcc --version
!nvidia-smi
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.
This makes it easier to read
!nvidia-smi -L
Run this two commands in collab
CUDA: Let’s check that Nvidia CUDA drivers are already pre-installed and which version is it.
!/usr/local/cuda/bin/nvcc --version
!nvidia-smi