MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Init

Method Init

tensorflow/stream_executor/rocm/rocm_rng.cc:127–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127bool GpuRng::Init() {
128 absl::MutexLock lock{&mu_};
129 CHECK(rng_ == nullptr);
130
131 hiprandStatus_t ret =
132 wrap::hiprandCreateGenerator(parent_, &rng_, HIPRAND_RNG_PSEUDO_DEFAULT);
133 if (ret != HIPRAND_STATUS_SUCCESS) {
134 LOG(ERROR) << "failed to create random number generator: " << ret;
135 return false;
136 }
137
138 CHECK(rng_ != nullptr);
139 return true;
140}
141
142bool GpuRng::SetStream(Stream* stream) {
143 hiprandStatus_t ret =

Callers 1

initialize_rocrandFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected