From 881a3e89bd6efaa69111ba36e794478e120e58b4 Mon Sep 17 00:00:00 2001 From: wangxiaotian22 Date: Wed, 28 Jul 2021 09:11:12 +0800 Subject: [PATCH] modify errorcode for common op error --- parser/caffe/caffe_parser.cc | 2 +- parser/common/pre_checker.cc | 4 ++-- parser/onnx/onnx_parser.cc | 4 ++-- parser/tensorflow/tensorflow_parser.cc | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/parser/caffe/caffe_parser.cc b/parser/caffe/caffe_parser.cc index fe5086f..ed995b0 100644 --- a/parser/caffe/caffe_parser.cc +++ b/parser/caffe/caffe_parser.cc @@ -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; diff --git a/parser/common/pre_checker.cc b/parser/common/pre_checker.cc index 9171087..e59c5f2 100644 --- a/parser/common/pre_checker.cc +++ b/parser/common/pre_checker.cc @@ -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."); } diff --git a/parser/onnx/onnx_parser.cc b/parser/onnx/onnx_parser.cc index 3c79a71..4cd6fbc 100644 --- a/parser/onnx/onnx_parser.cc +++ b/parser/onnx/onnx_parser.cc @@ -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({"opname", "optype"}), + REPORT_INPUT_ERROR("EZ0501", std::vector({"opname", "optype"}), std::vector({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()); diff --git a/parser/tensorflow/tensorflow_parser.cc b/parser/tensorflow/tensorflow_parser.cc index 001d6df..adf8350 100644 --- a/parser/tensorflow/tensorflow_parser.cc +++ b/parser/tensorflow/tensorflow_parser.cc @@ -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({"opname", "optype"}), + REPORT_INPUT_ERROR("EZ0501", std::vector({"opname", "optype"}), std::vector({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;