diff --git a/ge/generator/ge_generator.cc b/ge/generator/ge_generator.cc index e59026a1..47f7b217 100644 --- a/ge/generator/ge_generator.cc +++ b/ge/generator/ge_generator.cc @@ -157,7 +157,7 @@ static Status AddInputs(const ComputeGraphPtr &graph, const NodePtr &node, GeTen string op_type; bool is_const = false; - (void)AttrUtils::GetBool(tensor, CONST_ATTR_NAME_INPUT, in_const); + (void)AttrUtils::GetBool(tensor, CONST_ATTR_NAME_INPUT, is_const); if (is_const) { GELOGD("Get input[%d] is const", index); op_type = CONSTANTOP; @@ -172,11 +172,11 @@ static Status AddInputs(const ComputeGraphPtr &graph, const NodePtr &node, GeTen } if (is_const) { ConstGeTensorPtr tensor_value; - if(!AttrUtils::GetTensor(tensor, ge::ATTR_NAME_WEIGHTS, tensor_value)) { + if (!AttrUtils::GetTensor(tensor, ge::ATTR_NAME_WEIGHTS, tensor_value)) { GELOGE(FAILED, "Get value failed, node name:%s.", tensor.GetName().c_str()); return FAILED; } - if(!AttrUtils::SetTensor(data_op, ge::ATTR_NAME_WEIGHTS, tensor_value)) { + if (!AttrUtils::SetTensor(data_op, ge::ATTR_NAME_WEIGHTS, tensor_value)) { GELOGE(FAILED, "Set attr ATTR_NAME_WEIGHTS fail."); return FAILED; } diff --git a/ge/graph/preprocess/graph_preprocess.cc b/ge/graph/preprocess/graph_preprocess.cc index a1627536..ccce250d 100644 --- a/ge/graph/preprocess/graph_preprocess.cc +++ b/ge/graph/preprocess/graph_preprocess.cc @@ -1801,11 +1801,9 @@ void GraphPrepare::TypeConversionOfConstant() { for (ge::NodePtr &n : compute_graph_->GetAllNodes()) { // This can ensure that n is not a null pointer // No Conversion when called by aclOpCompile - if (n->GetOpDesc()->GetType() == CONSTANT) { - (void)AttrUtils::GetBool(n->GetOpDesc(), ATTR_DYNAMIC_SHAPE_SINGLE_AICPU, is_acl_comlpile)); - if ( is_acl_comlpile) { - return; - } + (void)AttrUtils::GetBool(n->GetOpDesc(), ATTR_DYNAMIC_SHAPE_SINGLE_AICPU, is_acl_comlpile)); + if (is_acl_comlpile) { + return; } }