def get_rng_state_all() -> List[Tensor]:
    r"""Returns a list of ByteTensor representing the random number states of all devices."""

    results = []
    for i in range(torch.xpu.device_count()):
        results.append(get_rng_state(i))
    return results
Returns a list of ByteTensor representing the random number states of all devices.
intel_extension_for_pytorch/xpu/random.py