torch.accelerator.random.initial_seed#
- torch.accelerator.random.initial_seed(device=None, /)[source]#
Return the initial seed of the default
torch.Generatorfor the current accelerator on the specified device.- Parameters:
device (
torch.device, str, int, optional) – The device to return the initial seed of. If not given, usestorch.accelerator.current_device_index()by default.- Returns:
the initial seed of the default generator for the specified device.
- Return type:
Warning
This function eagerly initializes the accelerator runtime.