Hi to everyone!
I’ve a very peculiar problem and I wasn’t able to find any hint on the web about it.
I’m working with a machine which mounts two GPU: a 2080 Ti and a 2080 with also the NVLINK.
I’m using Tensorflow 1.12 (compiled from source to work with CUDA 10) with Keras 2.2.4 API.
I would like to select one GPU at a time, but unfortunately the command CUDA_VISIBLE_DEVICES doesn’t work
as it should. Practically, if I don’t put any code it shows me both gpu. If I select “0” it shows me correctly
only the first one and finally if I put “1” it shows me again the first one GPU0. Why? What is its problem? :))
Thanks in advance for your help!
import os
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="0"
from keras import backend as k
k.tensorflow_backend._get_available_gpus()