def METHOD_NAME(
    self,
    num_inputs,
    num_gpus,
    r,
) -> None:
    dst_device = torch.device(f"cuda:{r.randint(0, num_gpus - 1)}")
    with torch.cuda.device(dst_device):
        inputs = [torch.randn(10, 20) for _ in range(num_inputs)]
        cuda_inputs = [
            input.to(f"cuda:{i % num_gpus}") for i, input in enumerate(inputs)
        ]
        cuda_outputs = torch.ops.fbgemm.all_to_one_device(cuda_inputs, dst_device)
        for i, o in zip(inputs, cuda_outputs):
            self.assertEqual(o.device, dst_device)
            torch.testing.assert_close(o.cpu(), i)