torch.xpu.random.manual_seed
- torch.xpu.random.manual_seed(seed)
Set the seed for generating random numbers for the current GPU.
It’s safe to call this function if XPU is not available; in that case, it is silently ignored.
- Parameters:
seed (int) – The desired seed.