Hey, I have the opposite problem: code is using both of my GPUs by default, no matter what I do.  These are different GPU models and I DO NOT want to use them for parallel processing.  I’ve tried setting GPU #0 with cuda_visible_devices, tried setting it with torch, moved it to beginning of code, nothing is working.
Just for the record, I am doing deep learning object detection importing arcgis and torch.  Everything else seems to work fine now, until I try to test learning rate and it tells me my GPUs are imbalanced and that I should exclude GPU #1.  I never wanted GPU #1 to be utilized in the first place.
EDIT: Nevermind, it appears to be working now after I did move it towards beginning of code.  I guess I reset the kernel somehow, which made it work.  I’m just a rookie