fix for tests using torch<2.1 (#4818)
Our torch 1.10 tests have been failling since the merge of #4569. This
added a `device_type` kwarg to the `torch.random.fork_rng` call. But
this is not compatible with older versions of torch. Added in
https://github.com/pytorch/pytorch/pull/98069
Fixes #4644, #4503