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

Method Init

tensorflow/stream_executor/cuda/cuda_blas.cc:191–204  ·  view source on GitHub ↗

Attempts the switch to the requested scoped math mode, new_mode. Note that when false is returned, an appropriate error has already been logged.

Source from the content-addressed store, hash-verified

189 // Note that when false is returned, an appropriate error has already been
190 // logged.
191 bool Init(cublasMath_t new_mode) {
192 cublasStatus_t ret = cublasGetMathMode(handle_, &old_mode_);
193 if (ret != CUBLAS_STATUS_SUCCESS) {
194 LOG(ERROR) << "failed to get old cublas math mode: " << ToString(ret);
195 return ok_ = false;
196 }
197
198 ret = cublasSetMathMode(handle_, new_mode);
199 if (ret != CUBLAS_STATUS_SUCCESS) {
200 LOG(ERROR) << "failed to set new cublas math mode: " << ToString(ret);
201 return ok_ = false;
202 }
203 return ok_ = true;
204 }
205
206 // Switches back to the prior math mode, if the switch operation was
207 // successful in the first place.

Callers

nothing calls this directly

Calls 1

ToStringFunction · 0.70

Tested by

no test coverage detected