Shortcuts

torch.cuda.get_rng_state

torch.cuda.get_rng_state(device='cuda')[source]

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

Parameters

device (torch.device or int, optional) – The device to return the RNG state of. Default: 'cuda' (i.e., torch.device('cuda'), the current CUDA device).

Warning

This function eagerly initializes CUDA.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources