Browse Source

fix aipp check

tags/v1.3.0
wangxiaotian22 3 years ago
parent
commit
f8392e4b44
2 changed files with 12 additions and 7 deletions
  1. +2
    -1
      ge/graph/preprocess/insert_op/ge_aipp_op.cc
  2. +10
    -6
      ge/graph/preprocess/insert_op/util_insert_aipp_op.cc

+ 2
- 1
ge/graph/preprocess/insert_op/ge_aipp_op.cc View File

@@ -428,7 +428,8 @@ Status AippOp::ConvertRelatedInputNameToRank() {
if (!convert_flag) {
string error_msg = "Top name " + related_input_name + "convert rank failed, Please"
" ensure top name in aipp config is the top name of data node.";
GE_ERRORLOG_AND_ERRORMSG(PARAM_INVALID, error_msg.c_str());
GELOGE(PARAM_INVALID, "[Check][InputParam]%s", error_msg.c_str());
REPORT_INPUT_ERROR("E19021", std::vector<std::string>({"reason"}), std::vector<std::string>({error_msg}));
return PARAM_INVALID;
}



+ 10
- 6
ge/graph/preprocess/insert_op/util_insert_aipp_op.cc View File

@@ -1,4 +1,4 @@
/**
/**
* Copyright 2020 Huawei Technologies Co., Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -124,13 +124,15 @@ Status InsertNewOpUtil::CheckInputNamePositionNotRepeat() {
if (another_item->related_input_name().empty()) {
string error_msg = "Can not both set related_input_name and related_input_rank!"
" Please ensure param is the same with the first aipp config(related_input_name).";
GE_ERRORLOG_AND_ERRORMSG(PARAM_INVALID, error_msg.c_str());
GELOGE(PARAM_INVALID, "[Check][InputParam]%s", error_msg.c_str());
REPORT_INPUT_ERROR("E19021", std::vector<std::string>({"reason"}), std::vector<std::string>({error_msg}));
return PARAM_INVALID;
}
if (item->related_input_name() == another_item->related_input_name()) {
string error_msg = "Can not insert aipp to the same postion! Please ensure related_input_name"
" param is different in different aipp config.";
GE_ERRORLOG_AND_ERRORMSG(PARAM_INVALID, error_msg.c_str());
GELOGE(PARAM_INVALID, "[Check][InputParam]%s", error_msg.c_str());
REPORT_INPUT_ERROR("E19021", std::vector<std::string>({"reason"}), std::vector<std::string>({error_msg}));
return PARAM_INVALID;
}
}
@@ -150,13 +152,15 @@ Status InsertNewOpUtil::CheckInputRankPositionNoRepeat() {
if (!another_item->related_input_name().empty()) {
string error_msg = "Can not both set related_input_rank and related_input_name!"
" Please ensure param is the same with the first aipp config(related_input_rank).";
GE_ERRORLOG_AND_ERRORMSG(PARAM_INVALID, error_msg.c_str());
GELOGE(PARAM_INVALID, "[Check][InputParam]%s", error_msg.c_str());
REPORT_INPUT_ERROR("E19021", std::vector<std::string>({"reason"}), std::vector<std::string>({error_msg}));
return PARAM_INVALID;
}
if (item->related_input_rank() == another_item->related_input_rank()) {
string error_msg = "Can not insert aipp to the same postion! Please ensure related_input_rank"
" param is different in different aipp config.";
GE_ERRORLOG_AND_ERRORMSG(PARAM_INVALID, error_msg.c_str());
GELOGE(PARAM_INVALID, "[Check][InputParam]%s", error_msg.c_str());
REPORT_INPUT_ERROR("E19021", std::vector<std::string>({"reason"}), std::vector<std::string>({error_msg}));
return PARAM_INVALID;
}
}
@@ -212,7 +216,7 @@ Status InsertNewOpUtil::CheckGraph(const ComputeGraphPtr &graph) {
}
}
}
GE_CHK_LOG_AND_ERRORMSG((aippNodes.size() == 0) || (aippNodes.size() == next_nodes_cnt),
GE_CHK_LOG_AND_ERRORMSG((aippNodes.size() == 0) || (aippNodes.size() == next_nodes_cnt),
PARAM_INVALID,
"Can not config part of outputs of Data node to support AIPP, config all "
"of the outputs of Data to support AIPP, or config none of them");


Loading…
Cancel
Save