summaryrefslogtreecommitdiff
path: root/torch/cuda/random.py
blob: 8d49587c1d2a9204bf5930d1f50951f634b95708 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from torch import _C
from . import _lazy_init


def get_rng_state():
    _lazy_init()
    return _C._cuda_getRNGState()


def set_rng_state(new_state):
    _lazy_init()
    return _C._cuda_setRNGState(new_state)


def manual_seed(seed):
    _lazy_init()
    return _C._cuda_manualSeed(seed)


def manual_seed_all(seed):
    _lazy_init()
    return _C._cuda_manualSeedAll(seed)


def seed():
    _lazy_init()
    return _C._cuda_seed()


def seed_all():
    _lazy_init()
    return _C._cuda_seedAll()


def initial_seed():
    _lazy_init()
    return _C._cuda_initialSeed()