Browse Source

add warning log for weight compress option

tags/v1.2.0
李磊 3 years ago
parent
commit
ac79981d2b
2 changed files with 6 additions and 1 deletions
  1. +5
    -0
      ge/ir_build/attr_options/weight_compress_option.cc
  2. +1
    -1
      metadef

+ 5
- 0
ge/ir_build/attr_options/weight_compress_option.cc View File

@@ -46,18 +46,23 @@ graphStatus WeightCompressFunc(ComputeGraphPtr &graph, const string &cfg_path) {
vector<string> compress_node_vec = StringUtils::Split(compress_nodes, ';');
for (size_t i = 0; i < compress_node_vec.size(); ++i) {
bool is_find = false;
for (auto &node_ptr : graph->GetDirectNode()) {
GE_CHECK_NOTNULL(node_ptr);
auto op_desc = node_ptr->GetOpDesc();
GE_CHECK_NOTNULL(op_desc);
if ((op_desc->GetName() == compress_node_vec[i]) || IsOriginalOpFind(op_desc, compress_node_vec[i])) {
is_find = true;
if (!ge::AttrUtils::SetBool(op_desc, ge::ATTR_NAME_COMPRESS_WEIGHT, true)) {
GELOGE(GRAPH_FAILED, "node %s SetBool failed.", compress_node_vec[i].c_str());
return GRAPH_FAILED;
}
}
}
if (!is_find) {
GELOGW("node %s is not in graph", compress_node_vec[i].c_str());
}
}
return GRAPH_SUCCESS;
}


+ 1
- 1
metadef

@@ -1 +1 @@
Subproject commit 573c7983273efa902e246052382090d3bc3e5804
Subproject commit 29a779d0b1e0482092e387ccce2886b36dc5e395

Loading…
Cancel
Save