# tensorplay.cuda.random.get_rng_state

Source: https://www.tensorplay.cn/docs/generated/tensorplay.cuda.random.get_rng_state.html

# tensorplay.cuda.random.get_rng_state

tensorplay.cuda.random.get_rng_state(device: [int](https://docs.python.org/3/library/functions.html#int) | [str](https://docs.python.org/3/library/stdtypes.html#str) | [Any](https://docs.python.org/3/library/typing.html#typing.Any) = 'cuda') &#x2192; TensorBase[[source]](../_modules/tensorplay/cuda/random.html#get_rng_state)

Return the random number generator state of the specified GPU as a ByteTensor.

Parameters:

device ([tensorplay.Device](tensorplay.Device.html#tensorplay.Device) or [int](https://docs.python.org/3/library/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.
