# tensorplay.cuda.random.get_rng_state Source: https://www.tensorplay.cn/docs/generated/tensorplay.cuda.random.get_rng_state.html ```python tensorplay.cuda.random.get_rng_state(device: int | str | Any = 'cuda') → Tensor ``` Return the random number generator state of the specified GPU as a ByteTensor. Parameters: 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 return the RNG state of. Default: 'cuda' (i.e., the current CUDA device). > **Warning** > > This function eagerly initializes CUDA.