RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cuda:0!

dts88
Thu, 10 Aug 2023 01:45:28 +0000

I got the same issue and I made it.

Acutally I got only two GPUs, and I create a device map manually. Then I dispatch the model with my device map. And it works.