Browse Source

modify errorcode for common op error

pull/349/head
wangxiaotian22 4 years ago
parent
commit
881a3e89bd
4 changed files with 7 additions and 7 deletions
  1. +1
    -1
      parser/caffe/caffe_parser.cc
  2. +2
    -2
      parser/common/pre_checker.cc
  3. +2
    -2
      parser/onnx/onnx_parser.cc
  4. +2
    -2
      parser/tensorflow/tensorflow_parser.cc

+ 1
- 1
parser/caffe/caffe_parser.cc View File

@@ -920,7 +920,7 @@ Status CaffeModelParser::AddTensorDescToOpDescByIr(ge::OpDescPtr &op_desc, const
string layer_name = layer.name();
ge::Operator op_factory = ge::OperatorFactory::CreateOperator(layer_name, op_type);
if (op_factory.GetName() != layer.name()) {
ErrorManager::GetInstance().ATCReportErrMessage("E10501", {"opname", "optype"}, {layer_name, op_type});
ErrorManager::GetInstance().ATCReportErrMessage("EZ0501", {"opname", "optype"}, {layer_name, op_type});
GELOGE(FAILED, "[Invoke][CreateOperator]IR for op[%s] optype[%s] is not registered.",
layer_name.c_str(), op_type.c_str());
return FAILED;


+ 2
- 2
parser/common/pre_checker.cc View File

@@ -251,7 +251,7 @@ Status PreChecker::CheckTypeSupported(OpId id, const string &type, const string
cause.message = "The type is not supported.";
GELOGI("Check op[%s]'s type[%s] failed, it is not supported.", name.c_str(), type.c_str());
if (!is_tensorflow) {
ErrorManager::GetInstance().ATCReportErrMessage("E19010", {"opname", "optype"}, {name, type});
ErrorManager::GetInstance().ATCReportErrMessage("EZ9010", {"opname", "optype"}, {name, type});
}
GE_RETURN_WITH_LOG_IF_ERROR(AddCause(id, cause), "[Add][Cause] failed.");
}
@@ -266,7 +266,7 @@ Status PreChecker::CheckTypeSupported(OpId id, const string &type, const string

GELOGI("Check op[%s]'s type[%s] failed, it is not supported.", name.c_str(), type.c_str());
if (!is_tensorflow) {
ErrorManager::GetInstance().ATCReportErrMessage("E19010", {"opname", "optype"}, {name, type});
ErrorManager::GetInstance().ATCReportErrMessage("EZ9010", {"opname", "optype"}, {name, type});
}
GE_RETURN_WITH_LOG_IF_ERROR(AddCause(id, cause), "[Add][Cause] failed.");
}


+ 2
- 2
parser/onnx/onnx_parser.cc View File

@@ -433,7 +433,7 @@ Status OnnxModelParser::AdapterOpType(const ge::onnx::NodeProto *node_proto, std
}

if (!domi::OpRegistry::Instance()->GetOmTypeByOriOpType(ori_type, op_type)) {
ErrorManager::GetInstance().ATCReportErrMessage("E16002", {"optype"}, {ori_type});
ErrorManager::GetInstance().ATCReportErrMessage("E76002", {"optype"}, {ori_type});
GELOGE(PARAM_INVALID, "[Get][OmType] according ori_type : %s failed.", ori_type.c_str());
return PARAM_INVALID;
}
@@ -448,7 +448,7 @@ Status OnnxModelParser::TransNodeToOperator(const ge::onnx::NodeProto *node_prot
string node_name = node_proto->name();
op = ge::OperatorFactory::CreateOperator(node_name, op_type);
if (op.GetName() != node_name) {
REPORT_INPUT_ERROR("E10501", std::vector<std::string>({"opname", "optype"}),
REPORT_INPUT_ERROR("EZ0501", std::vector<std::string>({"opname", "optype"}),
std::vector<std::string>({node_name, op_type}));
GELOGE(INTERNAL_ERROR, "[Creat][Op] IR for op[%s] optype[%s] is not registered.",
node_name.c_str(), op_type.c_str());


+ 2
- 2
parser/tensorflow/tensorflow_parser.cc View File

@@ -374,7 +374,7 @@ Status TensorFlowModelParser::TransNodeToOpDesc(const domi::tensorflow::NodeDef
GE_RETURN_IF_ERROR(DefunToPartitionedCall(node_def, op));
GE_CHECK_NOTNULL(op);
} else {
ErrorManager::GetInstance().ATCReportErrMessage("E10501", {"opname", "optype"}, {node_name, op_type});
ErrorManager::GetInstance().ATCReportErrMessage("EZ0501", {"opname", "optype"}, {node_name, op_type});
GELOGE(INTERNAL_ERROR, "IR for op[%s] optype[%s] is not registered.", node_name.c_str(), op_type.c_str());
return FAILED;
}
@@ -918,7 +918,7 @@ Status TensorFlowModelParser::ParseNodeDef(TensorFlowModelParser *parser, ge::Co
}
return SUCCESS;
} else {
REPORT_INPUT_ERROR("E10501", std::vector<std::string>({"opname", "optype"}),
REPORT_INPUT_ERROR("EZ0501", std::vector<std::string>({"opname", "optype"}),
std::vector<std::string>({node_name, op_type}));
GELOGE(INTERNAL_ERROR, "op[%s] type[%s] have no ir factory.]", node_name.c_str(), op_type.c_str());
return FAILED;


Loading…
Cancel
Save