torch.mps.synchronize torch.mps.synchronize() Waits for all kernels in all streams on a MPS device to complete. Назадtorch.mps.set_rng_state