adapt to None Type Input

This commit is contained in:
laiyongqiang 2021-01-09 15:30:02 +08:00
parent cb74e58148
commit 56d7dd294b
1 changed files with 5 additions and 0 deletions

View File

@ -214,6 +214,11 @@ void Somas::InitCommonNodeInputs(bool is_all_nop_node, const CNodePtr &kernel) {
}
if (!AnfAlgo::IsRealCNodeKernel(prenode_index.first)) {
auto op_name = AnfAlgo::GetCNodeName(kernel);
TypeId input_origin_type = AnfAlgo::GetPrevNodeOutputInferDataType(kernel, i);
if ((op_name == kDynamicRNNOpName || op_name == kDynamicGRUV2OpName) && input_origin_type == kMetaTypeNone) {
continue;
}
auto parameter = GetSomasParameters(prenode_index.first, prenode_index.second);
node->input_parameters_map_[i] = parameter;
MS_LOG(DEBUG) << "Input [" << prenode_index.first->fullname_with_scope() << "] is not a real cnode kernel.";