forked from ROCm/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
THCTensorRandom.h
34 lines (26 loc) · 1.13 KB
/
THCTensorRandom.h
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
#ifndef TH_CUDA_TENSOR_RANDOM_INC
#define TH_CUDA_TENSOR_RANDOM_INC
#include "THCTensor.h"
#include "generic/THCTensorRandom.h"
#include "THCGenerateAllTypes.h"
#ifdef __HIP_PLATFORM_HCC__
#include <hiprand_kernel.h>
#endif
typedef struct THCGenerator THCGenerator;
typedef struct THCRNGState {
/* One generator per GPU */
THCGenerator* gen;
int num_devices;
} THCRNGState;
struct THCState;
THC_API void THCRandom_init(struct THCState *state, int num_devices, int current_device);
THC_API void THCRandom_shutdown(struct THCState *state);
THC_API uint64_t THCRandom_seed(struct THCState *state);
THC_API uint64_t THCRandom_seedAll(struct THCState *state);
THC_API void THCRandom_manualSeed(struct THCState *state, uint64_t the_seed_);
THC_API void THCRandom_manualSeedAll(struct THCState *state, uint64_t the_seed_);
THC_API uint64_t THCRandom_initialSeed(struct THCState *state);
THC_API void THCRandom_getRNGState(struct THCState *state, THByteTensor *rng_state);
THC_API void THCRandom_setRNGState(struct THCState *state, THByteTensor *rng_state);
THC_API struct curandStateMtgp32* THCRandom_generatorStates(struct THCState* state);
#endif