Browse Source

Merge branch 'development' of https://gitee.com/wan_xuelei/graphengine into development

pull/455/head
wxl 4 years ago
parent
commit
326fb49212
3 changed files with 9 additions and 8 deletions
  1. +1
    -1
      ge/common/CMakeLists.txt
  2. +4
    -3
      ge/graph/manager/graph_manager.cc
  3. +4
    -4
      ge/session/omg.cc

+ 1
- 1
ge/common/CMakeLists.txt View File

@@ -115,7 +115,7 @@ target_link_libraries(ge_common PRIVATE
slog
-Wl,--as-needed
json
-lrt
$<$<NOT:$<STREQUAL:${TARGET_SYSTEM_NAME},Android>>:-lrt>
-ldl
)



+ 4
- 3
ge/graph/manager/graph_manager.cc View File

@@ -2335,11 +2335,12 @@ Status GraphManager::OptimizeStage2(ge::ComputeGraphPtr &compute_graph) {
GE_CHK_STATUS_RET(pass_for_control_attr_optimize.AddPass("OptimizeStage2::AfterMergePasses::"
"EndOfSequenceAddControlPass",
new (std::nothrow) EndOfSequenceAddControlPass))
// SubgraphPass solves memory_assign_conflicts by insert MemcpyAsync node, which depends on multi attrs and
// graph-structure. So try not to add new pass after SubgraphPass.
// 'SubgraphPass' solves memory_assign_conflicts by insert MemcpyAsync node, which depends on multi attrs and
// graph-structure. Passes after 'SubgraphPass' MUST NOT remove MemcpyAsync/Identity nodes in subgraphs.
GE_CHK_STATUS_RET(pass_for_control_attr_optimize.AddPass("OptimizeStage2::ControlAttrOptimize::SubgraphPass",
new (std::nothrow) SubgraphPass))
// AttachStreamLabelPass modifies attr without changing structure of compute_graph
// 'AttachStreamLabelPass' modifies attr without changing structure of compute_graph
// All passes after 'AttachStreamLabelPass' MUST mark stream_label on new nodes by self.
GE_CHK_STATUS_RET(pass_for_control_attr_optimize.AddPass("OptimizeStage2::ControlAttrOptimize::AttachStreamLabelPass",
new (std::nothrow) AttachStreamLabelPass))



+ 4
- 4
ge/session/omg.cc View File

@@ -95,8 +95,8 @@ static void ParseAtcParms(const std::map<std::string, std::string> &atc_params,
}
}

static Status CheckInputShapeNode(const ComputeGraphPtr &graph, const bool is_dynamic_input) {
if (!is_dynamic_input) {
static Status CheckInputShapeNode(const ComputeGraphPtr &graph, const bool is_dynamic_input, RunMode run_mode) {
if (!is_dynamic_input && run_mode != MODEL_TO_JSON) {
for (auto node : graph->GetDirectNode()) {
if (node->GetType() == DATA) {
auto data_op_desc = node->GetOpDesc();
@@ -793,7 +793,7 @@ FMK_FUNC_HOST_VISIBILITY Status ParseGraph(ge::Graph &graph, const std::map<stri
compute_graph = GraphUtils::GetComputeGraph(graph);
GE_RETURN_IF_ERROR(CheckInputFp16Nodes(compute_graph, input_fp16_nodes, is_input_adjust_hw_layout));

GE_RETURN_IF_ERROR(CheckInputShapeNode(compute_graph, is_dynamic_input));
GE_RETURN_IF_ERROR(CheckInputShapeNode(compute_graph, is_dynamic_input, run_mode));

std::string compress_weight_conf;
ParseAtcParms(atc_params, "compress_weight_conf", compress_weight_conf);
@@ -999,7 +999,7 @@ FMK_FUNC_HOST_VISIBILITY Status ConvertFwkModelToJson(const domi::FrameworkType
ErrorManager::GetInstance().ATCReportErrMessage(
"E10001", {"parameter", "value", "reason"},
{"--framework", std::to_string(framework), "only support 0(Caffe) 3(TensorFlow) 5(Onnx)"});
GELOGE(PARAM_INVALID, "Input parameter[--framework] is mandatory and it's value must be: 0(Caffe) 3(TensorFlow) "
GELOGE(PARAM_INVALID, "Input parameter[--framework] is mandatory and it's value must be: 0(Caffe) 3(TensorFlow) "
"or 5(Onnx).");
return PARAM_INVALID;
}


Loading…
Cancel
Save