!466 dts:error message add

From: @wangwenhua1
Reviewed-by: @xchu42,@ji_chen
Signed-off-by:
pull/466/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit 20652221c3

@ -25,6 +25,7 @@
#include "common/util.h" #include "common/util.h"
#include "common/util/error_manager/error_manager.h" #include "common/util/error_manager/error_manager.h"
#include "framework/common/debug/ge_log.h" #include "framework/common/debug/ge_log.h"
#include "framework/common/debug/log.h"
#include "ge/ge_api.h" #include "ge/ge_api.h"
#include "graph/debug/ge_attr_define.h" #include "graph/debug/ge_attr_define.h"
#include "graph/ge_context.h" #include "graph/ge_context.h"
@ -76,6 +77,9 @@ static Status CheckEngineTypeSupport(const OpDescPtr &op_desc, OpEngineType engi
op_engine_name = iter->second; op_engine_name = iter->second;
GELOGI("CheckEngineType: engine type: %d", static_cast<int>(engine_type)); GELOGI("CheckEngineType: engine type: %d", static_cast<int>(engine_type));
} else { } else {
ErrorManager::GetInstance().ATCReportErrMessage("E14001", {"opname", "optype", "value", "reason"},
{op_desc->GetName(), op_desc->GetType(), "engine type",
"it only support kEngineNameDefault/kAIcoreEngine/kVectorEngine"});
GELOGE(FAILED, "CheckEngineType: engine type: %d not support", static_cast<int>(engine_type)); GELOGE(FAILED, "CheckEngineType: engine type: %d not support", static_cast<int>(engine_type));
return FAILED; return FAILED;
} }
@ -94,6 +98,8 @@ static Status CheckEngineTypeSupport(const OpDescPtr &op_desc, OpEngineType engi
OpsKernelManager &ops_kernel_manager = instance_ptr->OpsKernelManagerObj(); OpsKernelManager &ops_kernel_manager = instance_ptr->OpsKernelManagerObj();
std::vector<OpInfo> op_infos = ops_kernel_manager.GetOpsKernelInfo(op_desc->GetType()); std::vector<OpInfo> op_infos = ops_kernel_manager.GetOpsKernelInfo(op_desc->GetType());
if (op_infos.empty()) { if (op_infos.empty()) {
ErrorManager::GetInstance().ATCReportErrMessage("E14001", {"opname", "optype", "value", "reason"},
{op_desc->GetName(), op_desc->GetType(), "optype", "it can not find"});
GELOGE(FAILED, "CheckEngineType: Can not get op info by op type %s", op_desc->GetType().c_str()); GELOGE(FAILED, "CheckEngineType: Can not get op info by op type %s", op_desc->GetType().c_str());
return FAILED; return FAILED;
} }
@ -105,7 +111,9 @@ static Status CheckEngineTypeSupport(const OpDescPtr &op_desc, OpEngineType engi
} }
} }
if (kernel_name.empty()) { if (kernel_name.empty()) {
GELOGE(FAILED, "CheckEngineType:Can not find ops kernel,engine name: %s.", op_engine_name.c_str()); ErrorManager::GetInstance().ATCReportErrMessage("E14001", {"opname", "optype", "value", "reason"},
{op_desc->GetName(), op_desc->GetType(), "engine name" + FmtToStr(op_engine_name), "it can not find"});
GELOGE(FAILED, "CheckEngineType:Can not find ops kernel, engine name: %s.", op_engine_name.c_str());
return FAILED; return FAILED;
} }
auto &kernel_map = ops_kernel_manager.GetAllOpsKernelInfoStores(); auto &kernel_map = ops_kernel_manager.GetAllOpsKernelInfoStores();
@ -119,11 +127,15 @@ static Status CheckEngineTypeSupport(const OpDescPtr &op_desc, OpEngineType engi
op_engine_name.c_str(), op_desc->GetName().c_str()); op_engine_name.c_str(), op_desc->GetName().c_str());
return SUCCESS; return SUCCESS;
} else { } else {
ErrorManager::GetInstance().ATCReportErrMessage(
"E13002", {"optype", "opskernel", "reason"}, {op_desc->GetType(), kernel_name, unsupported_reason});
GELOGE(FAILED, "CheckEngineType: check support failed, Op type %s of ops kernel %s is unsupported, reason:%s", GELOGE(FAILED, "CheckEngineType: check support 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()); op_desc->GetType().c_str(), kernel_name.c_str(), unsupported_reason.c_str());
return FAILED; return FAILED;
} }
} else { } else {
ErrorManager::GetInstance().ATCReportErrMessage(
"E13003", {"opname", "optype"}, {op_desc->GetName(), op_desc->GetType()});
GELOGE(FAILED, GELOGE(FAILED,
"CheckEngineType:Can not find any supported ops kernel info store by kernel_name %s," "CheckEngineType:Can not find any supported ops kernel info store by kernel_name %s,"
"op type is %s, op name is %s", "op type is %s, op name is %s",
@ -536,10 +548,16 @@ Status GeGenerator::CheckForSingleOp(OpDescPtr &op_desc, const vector<GeTensor>
const vector<GeTensor> &outputs) { const vector<GeTensor> &outputs) {
GE_CHECK_NOTNULL_EXEC(op_desc, return PARAM_INVALID); GE_CHECK_NOTNULL_EXEC(op_desc, return PARAM_INVALID);
if (!inputs.empty() && (inputs.size() != op_desc->GetAllInputsSize())) { if (!inputs.empty() && (inputs.size() != op_desc->GetAllInputsSize())) {
ErrorManager::GetInstance().ATCReportErrMessage("E14001", {"opname", "optype", "value", "reason"},
{op_desc->GetName(), op_desc->GetType(), "inputs size" + FmtToStr(op_desc->GetAllInputsSize()),
"tensor size is " + FmtToStr(inputs.size())});
GELOGE(PARAM_INVALID, "Tensor size: %zu, Inputs size: %zu", inputs.size(), op_desc->GetAllInputsSize()); GELOGE(PARAM_INVALID, "Tensor size: %zu, Inputs size: %zu", inputs.size(), op_desc->GetAllInputsSize());
return PARAM_INVALID; return PARAM_INVALID;
} }
if (!outputs.empty() && (outputs.size() != op_desc->GetOutputsSize())) { if (!outputs.empty() && (outputs.size() != op_desc->GetOutputsSize())) {
ErrorManager::GetInstance().ATCReportErrMessage("E14001", {"opname", "optype", "value", "reason"},
{op_desc->GetName(), op_desc->GetType(), "outputs size" + FmtToStr(op_desc->GetOutputsSize()),
"tensor size is " + FmtToStr(outputs.size())});
GELOGE(PARAM_INVALID, "Tensor size: %zu, Outputs size: %zu", outputs.size(), op_desc->GetOutputsSize()); GELOGE(PARAM_INVALID, "Tensor size: %zu, Outputs size: %zu", outputs.size(), op_desc->GetOutputsSize());
return PARAM_INVALID; return PARAM_INVALID;
} }

@ -418,7 +418,7 @@ Status CheckCompressWeightParamValid(const std::string enable_compress_weight, c
} }
if ((enable_compress_weight == "true") && (!compress_weight_conf.empty())) { if ((enable_compress_weight == "true") && (!compress_weight_conf.empty())) {
ErrorManager::GetInstance().ATCReportErrMessage("E10009", {"parameter0", "parameter1"}, ErrorManager::GetInstance().ATCReportErrMessage("E10047", {"parameter0", "parameter1"},
{"enable_compress_weight", "compress_weight_conf"}); {"enable_compress_weight", "compress_weight_conf"});
GELOGE(ge::PARAM_INVALID, "enable_compress_weight and compress_weight_conf can not both exist!!"); GELOGE(ge::PARAM_INVALID, "enable_compress_weight and compress_weight_conf can not both exist!!");
return ge::PARAM_INVALID; return ge::PARAM_INVALID;

Loading…
Cancel
Save