It depends on how the code was written. If the model forward function has sth like:
def forward(input):
    x1 = self.layer1(input.to("cuda:0"))
    x2 = self.layer2(input.to("cuda:1"))
    x3 = self.layer3(input.to("cuda:2"))
    return x3

Then it would certainly fail as it cannot find the device.
If there is nothing like that, you probably can get around by doing sth like:
torch.distributed.init_process_group(backend='nccl', init_method=opt.dist_url, world_size=1, rank=0)

You might also need to change opt.dist_url into sth like "tcp://localhost:23456"