I load my 2 model on gpu1 and gpu2. current_device is set on gpu1
then I can forward model on gpu1 but cannot model on gpu2 with this error
RuntimeError: all tensors must be on devices[0]

After I change the current device to gpu1 with this line, the same error occurs
torch.cuda.set_device(1)