My machine has three GPUs with indexes 0, 1, and 2.
To assign my program to a specific GPU, I used the lines below:
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
How can I print the GPU index on which my program is executing?
My machine has three GPUs with indexes 0, 1, and 2.
To assign my program to a specific GPU, I used the lines below:
import os
os.environ["CUDA_VISIBLE_DEVICES"] = "1"
How can I print the GPU index on which my program is executing?