!11121 adapt to NONE Type Input

From: @laiyongqiang
Reviewed-by: @kisnwang,@zhoufeng54
Signed-off-by: @zhoufeng54
This commit is contained in:
mindspore-ci-bot 2021-01-11 11:26:27 +08:00 committed by Gitee
commit 8d05cd1ffd
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.";