Page 1 of 1

Select specific GPU to use.

Posted: Thu Jan 13, 2022 6:08 am
by janipa

Hi,

My computer have two GPU , I would like to use only my second GPU for extracting and converting.

Is there any command or setting I can change to select only my second GPU,
Or where can I change the code to specify the GPU to use?

Like example:
with tf.device('/gpu:1')


Re: Select specific GPU to use.

Posted: Sun Jan 16, 2022 2:35 pm
by acaint

The argument is -X for excluding GPUs.
For example, putting argument

Code: Select all

-X 0 1

will exclude GPU:0 and GPU:1

I use it for forcing to make operations with specific GPU or even CPU-only, while the other GPU is already training some other stuff in other console (if you want to do parallel work like this, you also need -LF option to specify individual logfile location per each parallel work).

So in your case,

Code: Select all

-X 0

would exclude your GPU:0 , leaving GPU:1 available for processing.