torch.mps.manual_seed torch.mps.manual_seed(seed) Sets the seed for generating random numbers. Parameters: seed (int) – The desired seed.