def set_rng_state(new_state): r"""Sets the random number generator state. Args: new_state (torch.ByteTensor): The desired state """ _lazy_init() return _C._cuda_setRNGState(new_state)
def set_rng_state(new_state): r"""Sets the random number generator state of the current GPU. Args: new_state (torch.ByteTensor): The desired state """ new_state_copy = new_state.clone() _lazy_call(lambda: _C._cuda_setRNGState(new_state_copy))
def cb(): with device_ctx_manager(device): _C._cuda_setRNGState(new_state_copy)
def set_rng_state(new_state): _lazy_init() return _C._cuda_setRNGState(new_state)
def cb(): with device(device_id): _C._cuda_setRNGState(new_state_copy)