def initial_seed() -> int:
    r"""Returns the current random seed of the current GPU.

    .. warning::
        This function eagerly initializes XPU.
    """

    # lazy initialization occurs in current_device
    idx = torch.xpu.current_device()
    default_generator = torch.xpu.default_generators[idx]
    return default_generator.initial_seed()
Returns the current random seed of the current GPU.

    .. warning::
        This function eagerly initializes XPU.
    
intel_extension_for_pytorch/xpu/random.py