Browse Source

!11121 adapt to NONE Type Input

From: @laiyongqiang
Reviewed-by: @kisnwang,@zhoufeng54
Signed-off-by: @zhoufeng54
tags/v1.2.0-rc1
mindspore-ci-bot Gitee 4 years ago
parent
commit
8d05cd1ffd
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      mindspore/ccsrc/backend/optimizer/somas/somas.cc

+ 5
- 0
mindspore/ccsrc/backend/optimizer/somas/somas.cc View File

@@ -214,6 +214,11 @@ void Somas::InitCommonNodeInputs(bool is_all_nop_node, const CNodePtr &kernel) {
} }


if (!AnfAlgo::IsRealCNodeKernel(prenode_index.first)) { 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); auto parameter = GetSomasParameters(prenode_index.first, prenode_index.second);
node->input_parameters_map_[i] = parameter; node->input_parameters_map_[i] = parameter;
MS_LOG(DEBUG) << "Input [" << prenode_index.first->fullname_with_scope() << "] is not a real cnode kernel."; MS_LOG(DEBUG) << "Input [" << prenode_index.first->fullname_with_scope() << "] is not a real cnode kernel.";


Loading…
Cancel
Save