Fix test_multiple_devices_randint_cuda (#99775)
The test fails with device mismatch error:
```
Traceback (most recent call last):
File "/pytorch/torch/testing/_internal/common_utils.py", line 2137, in wrapper
method(*args, **kwargs)
File "/pytorch/torch/testing/_internal/common_device_type.py", line 401, in instantiated_test
result = test(self, **param_kwargs)
File "/pytorch/torch/testing/_internal/common_device_type.py", line 846, in test_wrapper
return test(*args, **kwargs)
File "/pytorch/torch/testing/_internal/common_device_type.py", line 1005, in only_fn
return fn(slf, *args, **kwargs)
File "/pytorch/torch/testing/_internal/common_device_type.py", line 1029, in multi_fn
return fn(slf, devices, *args, **kwargs)
File "/pytorch/test/test_ops.py", line 148, in test_multiple_devices
self.assertTrue(result.device == cuda_device)
AssertionError: False is not true
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/99775
Approved by: https://github.com/ngimel