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_VISIBLE_DEVICES=2. This will hide all devices but the one you specify and will make sure you never use other devices.