Browse Source

modify error_code related by op

pull/2072/head
yuxing 3 years ago
parent
commit
d4637deaa0
5 changed files with 14 additions and 7 deletions
  1. +2
    -2
      ge/engine_manager/dnnengine_manager.cc
  2. +2
    -2
      ge/generator/ge_generator.cc
  3. +1
    -1
      ge/graph/partition/engine_place.cc
  4. +2
    -2
      ge/graph/passes/compile_nodes_pass.cc
  5. +7
    -0
      tests/ut/ge/generator/ge_generator_unittest.cc

+ 2
- 2
ge/engine_manager/dnnengine_manager.cc View File

@@ -270,7 +270,7 @@ std::string DNNEngineManager::GetDNNEngineName(const ge::NodePtr &node_ptr) {
for (const auto &it : unsupported_reasons) {
reason += it.first + ":" + it.second + ";";
ErrorManager::GetInstance().ATCReportErrMessage(
"E13002", {"optype", "opskernel", "reason"}, {op_desc->GetType(), it.first, it.second});
"EZ3002", {"optype", "opskernel", "reason"}, {op_desc->GetType(), it.first, it.second});
GELOGE(GE_GRAPH_ASSIGN_ENGINE_FAILED, "[Check][OpSupported]Op type %s of ops kernel %s "
"is unsupported, reason : %s",
op_desc->GetType().c_str(), it.first.c_str(), it.second.c_str());
@@ -282,7 +282,7 @@ std::string DNNEngineManager::GetDNNEngineName(const ge::NodePtr &node_ptr) {
(void)Analyzer::GetInstance()->DoAnalyze(analyze_info);

ErrorManager::GetInstance().ATCReportErrMessage(
"E13003", {"opname", "optype"}, {op_desc->GetName(), op_desc->GetType()});
"EZ3003", {"opname", "optype"}, {op_desc->GetName(), op_desc->GetType()});
GELOGE(GE_GRAPH_ASSIGN_ENGINE_FAILED, "[Get][DNNEngineName]Can't find any supported ops kernel "
"and engine of %s, type is %s",
op_desc->GetName().c_str(), op_desc->GetType().c_str());


+ 2
- 2
ge/generator/ge_generator.cc View File

@@ -147,14 +147,14 @@ static Status CheckEngineTypeSupport(const NodePtr &node, OpEngineType engine_ty
return SUCCESS;
} else {
ErrorManager::GetInstance().ATCReportErrMessage(
"E13002", {"optype", "opskernel", "reason"}, {op_desc->GetType(), kernel_name, unsupported_reason});
"EZ3002", {"optype", "opskernel", "reason"}, {op_desc->GetType(), kernel_name, unsupported_reason});
GELOGE(FAILED, "[Call][CheckSupported] failed, Op type %s of ops kernel %s is unsupported, reason:%s",
op_desc->GetType().c_str(), kernel_name.c_str(), unsupported_reason.c_str());
return FAILED;
}
} else {
ErrorManager::GetInstance().ATCReportErrMessage(
"E13003", {"opname", "optype"}, {op_desc->GetName(), op_desc->GetType()});
"EZ3003", {"opname", "optype"}, {op_desc->GetName(), op_desc->GetType()});
GELOGE(FAILED, "[Check][Param] Can not find any supported ops kernel info store by kernel_name %s,"
"op type is %s, op name is %s",
kernel_name.c_str(), op_desc->GetType().c_str(), op_desc->GetName().c_str());


+ 1
- 1
ge/graph/partition/engine_place.cc View File

@@ -88,7 +88,7 @@ Status EnginePlacer::Run() {
if (engine_name.empty()) {
is_check_support_success = false;
ErrorManager::GetInstance().ATCReportErrMessage(
"E13003", {"opname", "optype"}, {op_desc->GetName(), op_desc->GetType()});
"EZ3003", {"opname", "optype"}, {op_desc->GetName(), op_desc->GetType()});
GELOGE(GE_CLI_GE_NOT_INITIALIZED, "[Check][Param] Can not find engine of op name %s type %s",
op_desc->GetName().c_str(), op_desc->GetType().c_str());
continue;


+ 2
- 2
ge/graph/passes/compile_nodes_pass.cc View File

@@ -141,14 +141,14 @@ graphStatus CompileNodesPass::GetSupportedKernel(const NodePtr &node, const std:
}
}
for (const auto &it : unsupported_reasons) {
REPORT_INPUT_ERROR("E13002", std::vector<std::string>({"optype", "opskernel", "reason"}),
REPORT_INPUT_ERROR("EZ3002", std::vector<std::string>({"optype", "opskernel", "reason"}),
std::vector<std::string>({op_desc->GetType(), it.first, it.second}));
GELOGE(GE_GRAPH_ASSIGN_ENGINE_FAILED,
"[Call][CheckAccuracySupport] for Op type %s of ops kernel %s is unsupported, reason:%s",
op_desc->GetType().c_str(), it.first.c_str(), it.second.c_str());
}

REPORT_INPUT_ERROR("E13003", std::vector<std::string>({"opname", "optype"}),
REPORT_INPUT_ERROR("EZ3003", std::vector<std::string>({"opname", "optype"}),
std::vector<std::string>({op_desc->GetName(), op_desc->GetType()}));
GELOGE(GRAPH_FAILED, "[Check][Param] Cannot find kernel lib support node:%s, type:%s , get kernel lib failed.",
node->GetName().c_str(), op_desc->GetType().c_str());


+ 7
- 0
tests/ut/ge/generator/ge_generator_unittest.cc View File

@@ -186,4 +186,11 @@ TEST_F(UtestGeGenerator, test_generate_online_model) {
std::string name;
EXPECT_NE(generator.GenerateOfflineModel(graph, name, inputs), SUCCESS);
}

TEST_F(UtestGeGenerator, test_check_engine_type_support) {
shared_ptr<OpDesc> op_desc = make_shared<OpDesc>("Add", "add");
GeGenerator generator;
generator.Initialize({});
EXPECT_EQ(generator.CheckEngineTypeSupport(op_desc, ENGINE_AIVECTOR), FAILED);
}
} // namespace ge

Loading…
Cancel
Save