|
@@ -238,6 +238,14 @@ Status FoldingPass::AddConstNode(NodePtr &node, IndexsToAnchors indexes_to_ancho |
|
|
node->GetName().c_str(), index); |
|
|
node->GetName().c_str(), index); |
|
|
return INTERNAL_ERROR; |
|
|
return INTERNAL_ERROR; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
vector<string> curr_origin_op_names; |
|
|
|
|
|
(void)AttrUtils::GetListStr(node->GetOpDesc(), ATTR_NAME_DATA_DUMP_ORIGIN_OP_NAMES, curr_origin_op_names); |
|
|
|
|
|
if (curr_origin_op_names.empty()) { |
|
|
|
|
|
(void)AttrUtils::SetListStr(const_desc, ATTR_NAME_DATA_DUMP_ORIGIN_OP_NAMES, {node->GetName()}); |
|
|
|
|
|
} else { |
|
|
|
|
|
(void)AttrUtils::SetListStr(const_desc, ATTR_NAME_DATA_DUMP_ORIGIN_OP_NAMES, curr_origin_op_names); |
|
|
|
|
|
} |
|
|
GELOGI("add const_node:%s, replace node %s, type %s, index %zu.", const_node->GetName().c_str(), |
|
|
GELOGI("add const_node:%s, replace node %s, type %s, index %zu.", const_node->GetName().c_str(), |
|
|
node->GetName().c_str(), node->GetType().c_str(), index); |
|
|
node->GetName().c_str(), node->GetType().c_str(), index); |
|
|
// add new const to re-pass node |
|
|
// add new const to re-pass node |
|
|