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

Function ToCudnnRNNAlgo

tensorflow/stream_executor/cuda/cuda_dnn.cc:314–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312}
313
314cudnnRNNAlgo_t ToCudnnRNNAlgo(absl::optional<dnn::AlgorithmDesc> algorithm) {
315 if (!algorithm.has_value()) {
316 return CUDNN_RNN_ALGO_STANDARD;
317 }
318 cudnnRNNAlgo_t algo = static_cast<cudnnRNNAlgo_t>(algorithm->algo_id());
319 switch (algo) {
320 case CUDNN_RNN_ALGO_STANDARD:
321 case CUDNN_RNN_ALGO_PERSIST_STATIC:
322 case CUDNN_RNN_ALGO_PERSIST_DYNAMIC:
323 return algo;
324 default:
325 LOG(FATAL) << "Unsupported Cudnn RNN algorithm: " << algorithm->algo_id();
326 }
327}
328
329port::Status GetLoadedCudnnVersion(CudnnVersion* version) {
330 SE_ASSIGN_OR_RETURN(version->major_version, GetCudnnProperty(MAJOR_VERSION));

Callers 2

CudnnRnnDescriptorMethod · 0.85
CreateMethod · 0.85

Calls 2

has_valueMethod · 0.45
algo_idMethod · 0.45

Tested by

no test coverage detected