diff --git a/torch/random.py b/torch/random.py index 371dab951f4..d7746344786 100644 --- a/torch/random.py +++ b/torch/random.py @@ -8,6 +8,9 @@ import torch def set_rng_state(new_state: torch.Tensor) -> None: r"""Sets the random number generator state. + .. note: This function only works for CPU. For CUDA, please use + torch.manual_seed(seed), which works for both CPU and CUDA. + Args: new_state (torch.ByteTensor): The desired state """