# tensorplay.cuda.random.set_rng_state Source: https://www.tensorplay.cn/docs/generated/tensorplay.cuda.random.set_rng_state.html ```python tensorplay.cuda.random.set_rng_state(new_state: Tensor, device: int | str | Any = 'cuda') → None ``` Set the random number generator state of the specified GPU. Parameters: - new_state (ByteTensor) – The desired state - device ([tensorplay.Device](/docs/generated/tensorplay.Device.html#tensorplay.Device) or [int](https://docs.python.org/3/builtins/functions.html#int), optional) – The device to set the RNG state. Default: 'cuda' (i.e., the current CUDA device).