Ejemplo n.º 1
0
def get_rng_state():
    r"""Returns the random number generator state of the current
    GPU as a ByteTensor.

    .. warning::
        This function eagerly initializes CUDA.
    """
    _lazy_init()
    return _C._cuda_getRNGState()
Ejemplo n.º 2
0
def get_rng_state(device=-1):
    r"""Returns the random number generator state of the current
    GPU as a ByteTensor.

    Args:
        device (int, optional): The device to return the RNG state of.
            Default: -1 (i.e., use the current device).

    .. warning::
        This function eagerly initializes CUDA.
    """
    _lazy_init()
    with device_ctx_manager(device):
        return _C._cuda_getRNGState()
Ejemplo n.º 3
0
def get_rng_state(device=-1):
    r"""Returns the random number generator state of the current
    GPU as a ByteTensor.

    Args:
        device (int, optional): The device to return the RNG state of.
            Default: -1 (i.e., use the current device).

    .. warning::
        This function eagerly initializes CUDA.
    """
    _lazy_init()
    with device_ctx_manager(device):
        return _C._cuda_getRNGState()
Ejemplo n.º 4
0
def get_rng_state():
    _lazy_init()
    return _C._cuda_getRNGState()
Ejemplo n.º 5
0
def get_rng_state():
    r"""Returns the random number generator state as a ByteTensor."""
    _lazy_init()
    return _C._cuda_getRNGState()