Solved by spanev in post #2 
              
              
                Hi @besterma, 
Sure, you can do it with the env variable CUDA_VISIBLE_DEVICES. 
E.g. to use GPU 0 and 2: 
CUDA_VISIBLE_DEVICES=0,2 python pytorch_script.py

and in your case you have to give a different env variable to each process.