From 8580349a0bf1025b84bdfee9d544ac31a4c0d41c Mon Sep 17 00:00:00 2001 From: wxl Date: Wed, 9 Dec 2020 21:31:11 +0800 Subject: [PATCH] ir build optimize --- ge/ir_build/ge_ir_build.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ge/ir_build/ge_ir_build.cc b/ge/ir_build/ge_ir_build.cc index cc48f9fc..ff0d7592 100644 --- a/ge/ir_build/ge_ir_build.cc +++ b/ge/ir_build/ge_ir_build.cc @@ -262,11 +262,13 @@ graphStatus Impl::UpdateDataOpAttr(const Graph &graph) { ge::OpDescPtr op = input_node->GetOpDesc(); GE_CHECK_NOTNULL(op); if (op->GetType() == DATA) { - auto tensor = op->MutableInputDesc(0); + auto tensor_input = op->MutableInputDesc(0); + auto tensor_output = op->MutableOutputDesc(0); string data_op_name = op->GetName(); auto iter = shape_map.find(data_op_name); if (iter != shape_map.end()) { - tensor->SetShape(ge::GeShape(iter->second)); + tensor_input->SetShape(ge::GeShape(iter->second)); + tensor_output->SetShape(ge::GeShape(iter->second)); GELOGD("update input [%s] shape info", data_op_name.c_str()); } else { GELOGI("no need update input [%s] attr because not found from input_shape.", data_op_name.c_str()); @@ -357,7 +359,10 @@ graphStatus Impl::Init(const Graph &graph, const std::map