Solved by albanD in post #2 
              
              
                Hi, 
Tensorflow has the bad habbit of taking all the memory on the device and prevent anything from happening on it as anything will OOM. 
There was a small bug in pytorch that was initializing the cuda runtime on device 0 when printing that has been fixed. 
A simple workaround is to use CUDA_VISIBL…