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

Function CheckRNNParameterSize

tensorflow/stream_executor/rocm/rocm_dnn.cc:1956–1970  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1954}
1955
1956bool CheckRNNParameterSize(
1957 miopenHandle_t miopen_handle, const MIOpenRnnDescriptor& rnn_desc,
1958 const MIOpenRnnSequenceTensorDescriptor& input_desc) {
1959 size_t params_size_in_bytes = 0;
1960 auto status = wrap::miopenGetRNNParamsSize(
1961 miopen_handle /*handle*/, rnn_desc.handle() /*rnnDesc*/,
1962 input_desc.handles()[0] /*xDesc*/, &params_size_in_bytes /*sizeInBytes*/,
1963 rnn_desc.data_type() /*dataType*/);
1964 if (status != miopenStatusSuccess) {
1965 LOG(ERROR) << "Unable to check RNN param size: " << ToString(status);
1966 return false;
1967 }
1968 return static_cast<int64>(params_size_in_bytes) ==
1969 rnn_desc.ParamsSizeInBytes();
1970}
1971
1972bool CreateRnnWorkspace(Stream* stream, miopenHandle_t miopen_handle,
1973 const MIOpenRnnDescriptor& rnn_desc,

Callers 2

DoRnnForwardImplMethod · 0.70
DoRnnBackwardImplMethod · 0.70

Calls 5

ToStringFunction · 0.70
handleMethod · 0.45
handlesMethod · 0.45
data_typeMethod · 0.45
ParamsSizeInBytesMethod · 0.45

Tested by

no test coverage detected