diff --git a/ge/host_cpu_engine/engine/host_cpu_engine.cc b/ge/host_cpu_engine/engine/host_cpu_engine.cc index 62dd9ec2..7d4b9df7 100644 --- a/ge/host_cpu_engine/engine/host_cpu_engine.cc +++ b/ge/host_cpu_engine/engine/host_cpu_engine.cc @@ -35,7 +35,6 @@ Status HostCpuEngine::Initialize(const std::map &options) { ops_kernel_store_ = MakeShared(); if (ops_kernel_store_ == nullptr) { GELOGE(FAILED, "[Init][HostCpuEngine] fail for new HostCpuOpsKernelInfoStore."); - REPORT_INNER_ERROR("E19999", "HostCpuEngine Initialize failed. fail for new HostCpuOpsKernelInfoStore."); return FAILED; } } diff --git a/ge/host_cpu_engine/ops_kernel_store/host_cpu_ops_kernel_builder.cc b/ge/host_cpu_engine/ops_kernel_store/host_cpu_ops_kernel_builder.cc index 28f0cdc4..844969eb 100644 --- a/ge/host_cpu_engine/ops_kernel_store/host_cpu_ops_kernel_builder.cc +++ b/ge/host_cpu_engine/ops_kernel_store/host_cpu_ops_kernel_builder.cc @@ -76,11 +76,11 @@ Status HostCpuOpsKernelBuilder::CalcOpRunningParam(Node &ge_node) { if ((TensorUtils::CalcTensorMemSize(output_shape, format, data_type, output_mem_size) != GRAPH_SUCCESS) || (output_mem_size < 0)) { GELOGE(FAILED, "[Calc][TensorMemSize]fail for op[%s:%s] out[%zu], mem_size=%ld, format=%s, data_type=%s.", - name.c_str(), type.c_str(), i, output_mem_size, TypeUtils::FormatToSerialString(format).c_str(), - TypeUtils::DataTypeToSerialString(data_type).c_str()); - REPORT_CALL_ERROR("E19999", "CalcTensorMemSize failed when CalcOpRunningParam. fail for op[%s:%s] out[%zu], mem_size=%ld, format=%s, data_type=%s.", - name.c_str(), type.c_str(), i, output_mem_size, TypeUtils::FormatToSerialString(format).c_str(), - TypeUtils::DataTypeToSerialString(data_type).c_str()); + name.c_str(), type.c_str(), i, output_mem_size, TypeUtils::FormatToSerialString(format).c_str(), + TypeUtils::DataTypeToSerialString(data_type).c_str()); + REPORT_CALL_ERROR("E19999", "CalcTensorMemSize failed when CalcOpRunningParam. fail for op[%s:%s] out[%zu], " + "mem_size=%ld, format=%s, data_type=%s.", name.c_str(), type.c_str(), i, output_mem_size, + TypeUtils::FormatToSerialString(format).c_str(), TypeUtils::DataTypeToSerialString(data_type).c_str()); return FAILED; } GELOGI("Calc op[%s:%s] out[%zu] mem size is %ld, format=%s, data_type=%s.", @@ -89,10 +89,12 @@ Status HostCpuOpsKernelBuilder::CalcOpRunningParam(Node &ge_node) { TensorUtils::SetSize(output_tensor, output_mem_size); if (op_desc->UpdateOutputDesc(static_cast(i), output_tensor) != GRAPH_SUCCESS) { - GELOGE(FAILED, "[Update][OutputDesc] fail for op[%s:%s] out[%zu], format=%s, data_type=%s.", name.c_str(), type.c_str(), i, - TypeUtils::FormatToSerialString(format).c_str(), TypeUtils::DataTypeToSerialString(data_type).c_str()); - REPORT_CALL_ERROR("E19999", "UpdateOutputDesc failed when CalcOpRunningParam. fail for op[%s:%s] out[%zu], format=%s, data_type=%s.", name.c_str(), type.c_str(), i, - TypeUtils::FormatToSerialString(format).c_str(), TypeUtils::DataTypeToSerialString(data_type).c_str()); + GELOGE(FAILED, "[Update][OutputDesc] fail for op[%s:%s] out[%zu], format=%s, data_type=%s.", + name.c_str(), type.c_str(), i, TypeUtils::FormatToSerialString(format).c_str(), + TypeUtils::DataTypeToSerialString(data_type).c_str()); + REPORT_CALL_ERROR("E19999", "UpdateOutputDesc failed when CalcOpRunningParam. " + "fail for op[%s:%s] out[%zu], format=%s, data_type=%s.", name.c_str(), type.c_str(), i, + TypeUtils::FormatToSerialString(format).c_str(), TypeUtils::DataTypeToSerialString(data_type).c_str()); return FAILED; } } diff --git a/ge/init/gelib.cc b/ge/init/gelib.cc index 45e84801..03870522 100644 --- a/ge/init/gelib.cc +++ b/ge/init/gelib.cc @@ -129,8 +129,7 @@ Status GELib::InnerInitialize(const map &options) { Status initEmStatus = engineManager_.Initialize(options); GE_TIMESTAMP_END(EngineInitialize, "InnerInitialize::EngineInitialize"); if (initEmStatus != SUCCESS) { - GELOGE(initEmStatus, "[init][enginemanager] failed, options invalid. "); - REPORT_INNER_ERROR("E19999", "GE engine manager initial failed, as call DNNEngineManager::Initialize failed. "); + GELOGE(initEmStatus, "[Init][Enginemanager] failed, options invalid. "); RollbackInit(); return initEmStatus; } @@ -364,7 +363,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status GELib::InitSystemWithOpt // Update CSA file CsaInteract::GetInstance().Init(options.device_id, GetContext().TraceId()); Status ret = CsaInteract::GetInstance().WriteJobState(JOBSTATE_RUNNING, JOBSUBSTATE_ENV_INIT); - GE_LOGE_IF(ret != SUCCESS, "[Write][JobState] failed, ret:%u, jobstate_running=%d,substate_env_init=%d.", + GE_LOGE_IF(ret != SUCCESS, "[Write][JobState] failed, ret=%u , jobstate_running=%d , substate_env_init=%d .", ret, JOBSTATE_RUNNING, JOBSUBSTATE_ENV_INIT); // set device id @@ -396,7 +395,7 @@ Status GELib::SystemShutdownWithOptions(const Options &options) { // Update CSA file Status ret = CsaInteract::GetInstance().WriteJobState(JOBSTATE_SUCCEED); - GE_LOGE_IF(ret != SUCCESS, "[Write][JobState] failed, ret:%u jobstate_succeed=%d.", ret, JOBSTATE_SUCCEED); + GE_LOGE_IF(ret != SUCCESS, "[Write][JobState] failed, ret=%u jobstate_succeed=%d .", ret, JOBSTATE_SUCCEED); is_system_inited = false; is_shutdown = true; @@ -508,8 +507,7 @@ Status GELib::Finalize() { instancePtr_ = nullptr; init_flag_ = false; if (final_state != SUCCESS) { - GELOGE(FAILED, "[Check][State]finalization failed."); - REPORT_INNER_ERROR("E19999", "GELib::Finalize finalization failed because no init before."); + GELOGE(FAILED, "[Check][State]finalization failed, because no init before. "); return final_state; } GELOGI("finalization success."); diff --git a/ge/ir_build/atc_ir_common.cc b/ge/ir_build/atc_ir_common.cc index 28787048..dc2f504e 100755 --- a/ge/ir_build/atc_ir_common.cc +++ b/ge/ir_build/atc_ir_common.cc @@ -78,8 +78,7 @@ Status CheckInputFormat(const string &input_format) { if (!ge::TypeUtils::IsFormatValid(input_format.c_str())) { ErrorManager::GetInstance().ATCReportErrMessage( "E10001", {"parameter", "value", "reason"}, {"--input_format", input_format, "input format is invalid!"}); - GELOGE(ge::PARAM_INVALID, "[Check][InputParam]input format [%s] is invalid!", input_format.c_str()); - REPORT_CALL_ERROR("E19999", "CheckInputFormat failed, input_format [%s] is invalid!", input_format.c_str()); + GELOGE(ge::PARAM_INVALID, "[Check][InputFormat] [%s] is invalid!", input_format.c_str()); return ge::PARAM_INVALID; } return ge::SUCCESS; @@ -108,7 +107,7 @@ bool CheckDynamicBatchSizeInputShapeValid(map> shape_map if (size == 0) { ErrorManager::GetInstance().ATCReportErrMessage("E10031"); - GELOGE(ge::PARAM_INVALID, "[Check][Param]At least one batch n must be equal to -1 when set --dynamic_batch_size."); + GELOGE(ge::PARAM_INVALID, "[Check][Param]At least one batch n must be equal to -1 when set dynamic_batch_size."); return false; } @@ -118,8 +117,6 @@ bool CheckDynamicBatchSizeInputShapeValid(map> shape_map "E10033", {"value", "reason"}, {dynamic_batch_size, kDynamicBatchSizeError}); GELOGE(ge::PARAM_INVALID, "[Check][Param] dynamic_batch_size:%s is invalid. reason: %s", dynamic_batch_size.c_str(), kDynamicBatchSizeError); - REPORT_INNER_ERROR("E19999", "CheckDynamicBatchSizeInputShapeValid failed.dynamic_batch_size:%s is invalid. reason: %s", - dynamic_batch_size.c_str(), kDynamicBatchSizeError); return false; } } @@ -133,8 +130,6 @@ bool CheckDynamicImagesizeInputShapeValid(map> shape_map const std::string input_format, std::string &dynamic_image_size) { if (!input_format.empty() && !ge::TypeUtils::IsFormatValid(input_format.c_str())) { GELOGE(ge::PARAM_INVALID, "[Check][Param] input_format [%s] invalid.", input_format.c_str()); - REPORT_INNER_ERROR("E19999", "CheckDynamicImagesizeInputShapeValid failed, input_format [%s] invalid.", - input_format.c_str()); return false; } int32_t size = 0; @@ -179,9 +174,7 @@ bool CheckDynamicImagesizeInputShapeValid(map> shape_map ErrorManager::GetInstance().ATCReportErrMessage("E10020", {"DynamicImageSizeNum"}, {std::to_string(kDynamicImageSizeNum)}); GELOGE(ge::PARAM_INVALID, - "[Check][Param]dynamic_image_size invalid value:%s number of dimensions of each group must be %ld.", - dynamic_image_size.c_str(), kDynamicImageSizeNum); - REPORT_INNER_ERROR("E19999", "CheckDynamicImagesizeInputShapeValid failed, dynamic_image_size invalid value:%s number of dimensions of each group must be %ld.", + "[Check][Param] invalid value:%s number of dimensions of each group must be %ld.", dynamic_image_size.c_str(), kDynamicImageSizeNum); return false; } @@ -206,7 +199,7 @@ bool CheckDynamicDimsInputShapeValid(const map> &shape_m if (shapes.size() > kMaxNDDimNum || shapes.size() < kMinNDDimNum) { ErrorManager::GetInstance().ATCReportErrMessage( "E10001", {"parameter", "value", "reason"}, - {"--input_shape's dim", std::to_string(shapes.size()), "Dim num must within [1, 4] when set dynamic_dims"}); + {"input_shape's dim", std::to_string(shapes.size()), "Dim num must within [1, 4] when set dynamic_dims"}); GELOGE(ge::PARAM_INVALID, "[Check][Param]Dim num must within [%zu, %zu] when set dynamic_dims.", kMinNDDimNum, kMaxNDDimNum); return false; @@ -217,14 +210,13 @@ bool CheckDynamicDimsInputShapeValid(const map> &shape_m ErrorManager::GetInstance().ATCReportErrMessage( "E10001", {"parameter", "value", "reason"}, {"--input_shape's dynamic dim num", "0", "at least one dim should be -1 when set dynamic_dims"}); - GELOGE(ge::PARAM_INVALID, "[Check][Param]input_shape invalid, at least one dim should be -1 when set dynamic_dims."); + GELOGE(ge::PARAM_INVALID, + "[Check][Param]input_shape invalid, at least one dim should be -1 when set dynamic_dims."); return false; } if (!CheckAndParseDynamicDims(dynamic_dim, dynamic_dims)) { GELOGE(ge::PARAM_INVALID, "[CheckAndParse][DynamicDims]: %s failed.", dynamic_dims.c_str()); - REPORT_CALL_ERROR("E19999", "CheckAndParseDynamicDims failed,dynamic_dim:%d dynamic_dims:%s", - dynamic_dim,dynamic_dims.c_str()); return false; } @@ -245,8 +237,8 @@ bool CheckAndParseDynamicDims(int32_t dynamic_dim_num, std::string &dynamic_dims if (split_set.size() > kMaxDynamicDimNum) { ErrorManager::GetInstance().ATCReportErrMessage( "E10042", {"parameter", "reason"}, {"dynamic_dims", "dynamic_dims's num of parameter set can not exceed 100"}); - GELOGE(ge::PARAM_INVALID, "[Check][Param]dynamic_dims's num of parameter set can not exceed %zu.", kMaxDynamicDimNum); - REPORT_INNER_ERROR("E19999", "CheckAndParseDynamicDims failed, dynamic_dims:%s invalid.", dynamic_dims.c_str()); + GELOGE(ge::PARAM_INVALID, + "[Check][Param]dynamic_dims's num of parameter set can not exceed %zu.", kMaxDynamicDimNum); return false; } for (auto split_dim : split_set) { @@ -256,9 +248,8 @@ bool CheckAndParseDynamicDims(int32_t dynamic_dim_num, std::string &dynamic_dims "E10042", {"parameter", "reason"}, {"dynamic_dims", "Each gear setting needs to be consistent with the number of -1 in the inputshape"}); GELOGE(ge::PARAM_INVALID, "[Check][Param]dynamic_dims:%s invalid. " - "reason: Each gear setting needs to be consistent with the number of -1 in the inputshape.", dynamic_dims.c_str()); - - REPORT_INNER_ERROR("E19999", "CheckAndParseDynamicDims failed, dynamic_dims:%s invalid.", dynamic_dims.c_str()); + "reason: Each gear setting needs to be consistent with the number of -1 in the inputshape.", + dynamic_dims.c_str()); return false; } for (auto dim : one_set) { @@ -267,8 +258,8 @@ bool CheckAndParseDynamicDims(int32_t dynamic_dim_num, std::string &dynamic_dims ErrorManager::GetInstance().ATCReportErrMessage( "E10001", {"parameter", "value", "reason"}, {"--dynamic_dims's parameter", dim.c_str(), "must be positive integer"}); - GELOGE(ge::PARAM_INVALID, "[Check][Param]dynamic_dims:%s parameter must be positive integer.", dynamic_dims.c_str()); - REPORT_INNER_ERROR("E19999", "CheckAndParseDynamicDims failed, dynamic_dims:%s invalid.", dynamic_dims.c_str()); + GELOGE(ge::PARAM_INVALID, + "[Check][Param]dynamic_dims:%s parameter must be positive integer.", dynamic_dims.c_str()); return false; } } @@ -286,15 +277,11 @@ bool StringToLongNoThrow(const string &str, long &val) { {str, kShapeRangeValueConvertError, kInputShapeRangeSample3}); GELOGE(PARAM_INVALID, "[Parse][Parameter] str:%s invalid, reason: %s, correct sample is %s.", str.c_str(), kShapeRangeValueConvertError, kInputShapeRangeSample3); - REPORT_INNER_ERROR("E19999", "StringToLongNoThrow failed, str:%s invalid, reason: %s, correct sample is %s.", - str.c_str(), kShapeRangeValueConvertError, kInputShapeRangeSample3); } catch (const std::out_of_range) { ErrorManager::GetInstance().ATCReportErrMessage("E10048", {"shape_range", "reason", "sample"}, {str, kShapeRangeValueConvertError, kInputShapeRangeSample3}); GELOGE(PARAM_INVALID, "[Parse][Parameter] str:%s invalid, reason: %s, correct sample is %s.", str.c_str(), kShapeRangeValueConvertError, kInputShapeRangeSample3); - REPORT_INNER_ERROR("E19999", "StringToLongNoThrow failed str:%s invalid, reason: %s, correct sample is %s.", - str.c_str(), kShapeRangeValueConvertError, kInputShapeRangeSample3); } return false; } @@ -307,14 +294,13 @@ bool ParseSingleShapeRange(std::string &shape_range, vector> shape_range_val; if (!ParseSingleShapeRange(shape_range_str, shape_range_val)) { GELOGE(PARAM_INVALID, "[Parse][Param] shape_range_str: %s invalid.", shape_range_str.c_str()); - REPORT_CALL_ERROR("E19999", "ParseInputShapeRange failed, shape_range_str: %s invalid.", shape_range_str.c_str()); return false; } shape_range_map.emplace(make_pair(StringUtils::Trim(shape_range_pair_vec[0]), shape_range_val)); @@ -411,14 +388,15 @@ bool ParseInputShapeRange(const std::string &shape_range, } Status CheckDynamicInputParamValid(string &dynamic_batch_size, string &dynamic_image_size, string &dynamic_dims, - const string input_shape, const string input_shape_range, const string input_format, - bool &is_dynamic_input) { - int32_t param_size = static_cast(!dynamic_batch_size.empty()) + - static_cast(!dynamic_image_size.empty()) + static_cast(!dynamic_dims.empty()); - if (param_size > 1) { + const string input_shape, const string input_shape_range, const string input_format,bool &is_dynamic_input) + { + int32_t param_size = static_cast(!dynamic_batch_size.empty()) + + static_cast(!dynamic_image_size.empty()) + static_cast(!dynamic_dims.empty()); + if (param_size > 1) { ErrorManager::GetInstance().ATCReportErrMessage("E10009", {"parameter0", "parameter1", "parameter2"}, {"dynamic_batch_size", "dynamic_image_size", "dynamic_dims"}); - GELOGE(ge::PARAM_INVALID, "[Parse][Param]dynamic_batch_size, dynamic_image_size and dynamic_dims can only be set one"); + GELOGE(ge::PARAM_INVALID, + "[Parse][Param]dynamic_batch_size, dynamic_image_size and dynamic_dims can only be set one"); return ge::PARAM_INVALID; } @@ -427,7 +405,6 @@ Status CheckDynamicInputParamValid(string &dynamic_batch_size, string &dynamic_i std::map>> shape_range_map; if(!ParseInputShapeRange(input_shape_range, shape_range_map)) { GELOGE(ge::PARAM_INVALID, "[Parse][Param]input_shape_range: %s invalid.", input_shape_range.c_str()); - REPORT_CALL_ERROR("E19999", "ParseInputShapeRange failed, input_shape_range: %s invalid.", input_shape_range.c_str()); return ge::PARAM_INVALID; } } @@ -445,23 +422,19 @@ Status CheckDynamicInputParamValid(string &dynamic_batch_size, string &dynamic_i if (!ParseInputShape(input_shape, shape_map, user_shape_map, is_dynamic_input)) { GELOGE(ge::PARAM_INVALID, "[Parse][InputShape]input_shape: %s invalid.", input_shape.c_str()); - REPORT_CALL_ERROR("E19999", "ParseInputShape failed, input_shape: %s invalid.", input_shape.c_str()); return ge::PARAM_INVALID; } if (!dynamic_batch_size.empty()) { if (!CheckDynamicBatchSizeInputShapeValid(shape_map, dynamic_batch_size)) { GELOGE(ge::PARAM_INVALID, "[Check][DynamicBatchSizeInputShape] input_shape: %s invalid.", input_shape.c_str()); - REPORT_CALL_ERROR("E19999", "CheckDynamicBatchSizeInputShapeValid failed, input_shape: %s invalid.", input_shape.c_str()); return ge::PARAM_INVALID; } } if (!dynamic_image_size.empty()) { if (!CheckDynamicImagesizeInputShapeValid(shape_map, input_format, dynamic_image_size)) { - GELOGE(ge::PARAM_INVALID, "[Check][DynamicImagesizeInputShape] input_shape: %s invalid. dynamic_image_size:%d ", - input_shape.c_str(), dynamic_image_size); - REPORT_CALL_ERROR("E19999", "CheckDynamicImagesizeInputShapeValid failed, input_shape: %s invalid. dynamic_image_size:%d ", + GELOGE(ge::PARAM_INVALID, "[Check][DynamicImagesizeInputShape] %s invalid. dynamic_image_size:%d ", input_shape.c_str(), dynamic_image_size); return ge::PARAM_INVALID; } @@ -471,8 +444,6 @@ Status CheckDynamicInputParamValid(string &dynamic_batch_size, string &dynamic_i if (!CheckDynamicDimsInputShapeValid(shape_map, input_format, dynamic_dims)) { GELOGE(ge::PARAM_INVALID, "[Check][DynamicDimsInputShape]: %s of input shape: %s failed.", dynamic_dims.c_str(), input_shape.c_str()); - REPORT_CALL_ERROR("E19999", "CheckDynamicDimsInputShapeValid failed, input_shape: %s invalid. dynamic_dims:%s ", - input_shape.c_str(), dynamic_dims.c_str()); return ge::PARAM_INVALID; } } @@ -524,7 +495,6 @@ bool ParseInputShape(const string &input_shape, map> &sh ErrorManager::GetInstance().ATCReportErrMessage("E10002", {"shape", "reason", "sample"}, {shape, kDigitError, kInputShapeSample2}); GELOGE(PARAM_INVALID, "[Check][Param]input_shape:%s invalid", shape_value_str.c_str()); - REPORT_CALL_ERROR("E19999", "isdigit return false, input_shape:%s invalid", shape_value_str.c_str()); return false; } } @@ -547,7 +517,8 @@ bool ParseInputShape(const string &input_shape, map> &sh int64_t result = left_result; // - 1 is not currently supported if (!is_dynamic_input && result <= 0) { - ErrorManager::GetInstance().ATCReportErrMessage("E10011", {"shape", "result"}, {shape, std::to_string(result)}); + ErrorManager::GetInstance().ATCReportErrMessage("E10011", {"shape", "result"}, + {shape, std::to_string(result)}); GELOGW( "Input parameter[--input_shape]’s shape value[%s] is invalid, " "expect positive integer, but value is %ld.", @@ -570,7 +541,6 @@ Status CheckOutputTypeParamValid(const std::string output_type) { "E10001", {"parameter", "value", "reason"}, {"--output_type", output_type, kOutputTypeSupport}); GELOGE(ge::PARAM_INVALID, "[Check][Param]Invalid value for --output_type[%s], %s.", output_type.c_str(), kOutputTypeSupport); - REPORT_INNER_ERROR("E19999", "CheckOutputTypeParamValid failed, output_type: %s invalid.", output_type.c_str()); return ge::PARAM_INVALID; } return ge::SUCCESS; @@ -582,33 +552,33 @@ Status CheckBufferOptimizeParamValid(const std::string buffer_optimize) { ErrorManager::GetInstance().ATCReportErrMessage( "E10001", {"parameter", "value", "reason"}, {"--buffer_optimize", buffer_optimize, kBufferOptimizeSupport}); GELOGE(ge::PARAM_INVALID, - "[Check][Param]Invalid value for --buffer_optimize[%s], %s.", buffer_optimize.c_str(), kBufferOptimizeSupport); - REPORT_INNER_ERROR("E19999", "CheckBufferOptimizeParamValid failed, buffer_optimize: %s invalid.", buffer_optimize.c_str()); + "[Check][BufferOptimize]Invalid value for [%s], %s.", buffer_optimize.c_str(), kBufferOptimizeSupport); return ge::PARAM_INVALID; } return ge::SUCCESS; } -Status CheckCompressWeightParamValid(const std::string enable_compress_weight, const std::string compress_weight_conf) { +Status CheckCompressWeightParamValid(const std::string enable_compress_weight, + const std::string compress_weight_conf) { if ((!compress_weight_conf.empty()) && (!CheckInputPathValid(compress_weight_conf, "--compress_weight_conf"))) { - GELOGE(ge::PARAM_INVALID, "[Check][Param]compress weight config file not found, file_name:%s", compress_weight_conf.c_str()); - REPORT_INNER_ERROR("E19999", "CheckCompressWeightParamValid failed, compress_weight_conf: %s invalid.", compress_weight_conf.c_str()); + GELOGE(ge::PARAM_INVALID, "[Check][CompressWeight]compress weight config file not found, file_name:%s", + compress_weight_conf.c_str()); return ge::PARAM_INVALID; } if ((enable_compress_weight != "") && (enable_compress_weight != "true") && (enable_compress_weight != "false")) { ErrorManager::GetInstance().ATCReportErrMessage( "E10005", {"parameter", "value"}, {"enable_compress_weight", enable_compress_weight}); GELOGE(ge::PARAM_INVALID, - "[Check][Param]enable_compress_weight:%s must be true or false.", enable_compress_weight.c_str()); - REPORT_INNER_ERROR("E19999", "CheckCompressWeightParamValid failed, enable_compress_weight: %s invalid.", enable_compress_weight.c_str()); + "[Check][CompressWeight]enable_compress_weight:%s must be true or false.", enable_compress_weight.c_str()); return ge::PARAM_INVALID; } if ((enable_compress_weight == "true") && (!compress_weight_conf.empty())) { ErrorManager::GetInstance().ATCReportErrMessage("E10047", {"parameter0", "parameter1"}, {"enable_compress_weight", "compress_weight_conf"}); - GELOGE(ge::PARAM_INVALID, "[Check][Param]enable_compress_weight and compress_weight_conf can not both exist!!"); + GELOGE(ge::PARAM_INVALID, + "[Check][CompressWeight]enable_compress_weight and compress_weight_conf can not both exist!!"); return ge::PARAM_INVALID; } return ge::SUCCESS; @@ -619,7 +589,6 @@ Status CheckKeepTypeParamValid(const std::string &keep_dtype) { ErrorManager::GetInstance().ATCReportErrMessage( "E10001", {"parameter", "value", "reason"}, {"--keep_dtype", keep_dtype, kKeepDtypeError}); GELOGE(ge::PARAM_INVALID, "[Check][InputPath] file not found, file_name:%s", keep_dtype.c_str()); - REPORT_CALL_ERROR("E19999", "CheckInputPathValid failed, file not found, file_name:%s", keep_dtype.c_str()); return ge::PARAM_INVALID; } @@ -641,13 +610,12 @@ int CheckLogParamValidAndSetLogLevel(const std::string log) { } else if (log == "error") { ret = dlog_setlevel(-1, DLOG_ERROR, 1); } else { - GELOGE(ge::PARAM_INVALID, "[Check][LogParam]log:%s invalid, only support debug, info, warning, error, null", log.c_str()); - REPORT_INNER_ERROR("E19999", "CheckLogParamValidAndSetLogLevel failed, log:%s invalid", log.c_str()); + GELOGE(ge::PARAM_INVALID, + "[Check][LogParam]log:%s invalid, only support debug, info, warning, error, null", log.c_str()); return ret; } if (ret != 0) { GELOGE(ge::PARAM_INVALID, "[Check][LogParam]Log setlevel fail !"); - REPORT_INNER_ERROR("E19999", "CheckLogParamValidAndSetLogLevel failed, log:%s invalid", log.c_str()); } return ret; } @@ -656,7 +624,6 @@ Status CheckInsertOpConfParamValid(const std::string insert_op_conf) { if ((!insert_op_conf.empty()) && (!CheckInputPathValid(insert_op_conf, "--insert_op_conf"))) { GELOGE(ge::PARAM_INVALID, "[Check][InputPath]file not found: %s", insert_op_conf.c_str()); - REPORT_CALL_ERROR("E19999", "CheckInputPathValid failed, file not found: %s", insert_op_conf.c_str()); return ge::PARAM_INVALID; } return ge::SUCCESS; @@ -665,9 +632,7 @@ Status CheckInsertOpConfParamValid(const std::string insert_op_conf) { Status CheckDisableReuseMemoryParamValid(const std::string disable_reuse_memory) { if ((disable_reuse_memory != "") && (disable_reuse_memory != "0") && (disable_reuse_memory != "1")) { ErrorManager::GetInstance().ATCReportErrMessage("E10006", {"parameter"}, {"disable_reuse_memory"}); - GELOGE(ge::PARAM_INVALID, "[Check][DisableReuseMemoryParam]disable_reuse_memory must be 1 or 0."); - REPORT_INNER_ERROR("E19999", "CheckDisableReuseMemoryParamValid failed, disable_reuse_memory:%s invalid.", - disable_reuse_memory.c_str()); + GELOGE(ge::PARAM_INVALID, "[Check][DisableReuseMemory]disable_reuse_memory must be 1 or 0."); return ge::PARAM_INVALID; } return ge::SUCCESS; @@ -677,9 +642,7 @@ Status CheckEnableSingleStreamParamValid(const std::string enable_single_stream) if ((enable_single_stream != "") && (enable_single_stream != "true") && (enable_single_stream != "false")) { ErrorManager::GetInstance().ATCReportErrMessage( "E10005", {"parameter", "value"}, {"enable_single_stream", enable_single_stream}); - GELOGE(ge::PARAM_INVALID, "[Check][EnableSingleStreamParam]enable_single_stream:%s must be true or false.", - enable_single_stream.c_str()); - REPORT_INNER_ERROR("E19999", "CheckEnableSingleStreamParamValid failed, enable_single_stream:%s invalid.", + GELOGE(ge::PARAM_INVALID, "[Check][EnableSingleStream]enable_single_stream:%s must be true or false.", enable_single_stream.c_str()); return ge::PARAM_INVALID; } @@ -691,10 +654,8 @@ Status CheckImplmodeParamValid(const std::string &optypelist_for_implmode, std:: if (optypelist_for_implmode != "" && op_select_implmode == "") { ErrorManager::GetInstance().ATCReportErrMessage("E10001", {"parameter", "value", "reason"}, {"--op_select_implmode", op_select_implmode.c_str(), kCompressWeightError}); - GELOGE(ge::PARAM_INVALID, "[Check][ImplmodeParam]op_select_implmode:%s invalid, %s.", + GELOGE(ge::PARAM_INVALID, "[Check][Implmode]op_select_implmode:%s invalid, %s.", op_select_implmode.c_str(),kCompressWeightError); - REPORT_INNER_ERROR("E19999", "CheckImplmodeParamValid failed, op_select_implmode:%s invalid, %s.", - op_select_implmode.c_str(), kCompressWeightError); return ge::PARAM_INVALID; } // op_select_implmode default value is high_performance @@ -705,12 +666,10 @@ Status CheckImplmodeParamValid(const std::string &optypelist_for_implmode, std:: op_select_implmode != IR_OPTION_OP_SELECT_IMPLMODE_PRECISON) { ErrorManager::GetInstance().ATCReportErrMessage("E10001", {"parameter", "value", "reason"}, {"--op_select_implmode", op_select_implmode.c_str(), kSelectImplmodeError}); - GELOGE(ge::PARAM_INVALID, "[Check][ImplmodeParam]Invalid value for --op_select_implmode[%s], %s.", - op_select_implmode.c_str(), kSelectImplmodeError); - REPORT_INNER_ERROR("E19999", "CheckImplmodeParamValid failed, op_select_implmode:%s invalid, %s.", + GELOGE(ge::PARAM_INVALID, "[Check][Implmode]Invalid value for --op_select_implmode[%s], %s.", op_select_implmode.c_str(), kSelectImplmodeError); return ge::PARAM_INVALID; - }op_select_implmode[%s] + } } return ge::SUCCESS; @@ -774,7 +733,6 @@ Status UpdateDataOpShapeRange(const OpDescPtr &op, auto cur_shape_range = iter->second; if (TensorUtils::CheckShapeByShapeRange(origin_shape, cur_shape_range) != SUCCESS) { GELOGE(PARAM_INVALID, "[Check][OpDescPtr][%s] Check shape by shape range failed.", data_op_name.c_str()); - REPORT_CALL_ERROR("E19999", "CheckShapeByShapeRange failed, op invalid, op_name=%s.", data_op_name.c_str()); return PARAM_INVALID; } for (size_t idx = 0; idx < cur_shape_range.size(); idx++) { @@ -803,7 +761,6 @@ Status UpdateDynamicInputShapeRange(const ge::ComputeGraphPtr &compute_graph, co map>> shape_range_map; if (!ParseInputShapeRange(input_shape_range, shape_range_map)) { GELOGE(PARAM_INVALID, "[Parse][InputShapeRange] input_shape_range:%s invalid.", input_shape_range.c_str()); - REPORT_CALL_ERROR("E19999", "ParseInputShapeRange failed, input_shape_range:%s invalid.", input_shape_range.c_str()); return PARAM_INVALID; } @@ -814,7 +771,6 @@ Status UpdateDynamicInputShapeRange(const ge::ComputeGraphPtr &compute_graph, co if (op->GetType() == DATA) { if (UpdateDataOpShapeRange(op, shape_range_map) != SUCCESS) { GELOGE(FAILED, "[Update][Data] op[%s] invalid.", op->GetName().c_str()); - REPORT_CALL_ERROR("E19999", "UpdateDataOpShapeRange failed, op[%s] invalid.", op->GetName().c_str()); return FAILED; } } diff --git a/ge/ir_build/ge_ir_build.cc b/ge/ir_build/ge_ir_build.cc index 67a2664b..bbae61d4 100644 --- a/ge/ir_build/ge_ir_build.cc +++ b/ge/ir_build/ge_ir_build.cc @@ -145,7 +145,6 @@ static void GetOpsProtoPath(string &opsproto_path) { string file_path = RealPath(path.c_str()); if (file_path.empty()) { GELOGE(FAILED, "[Check][Path] %s is invalid.", path.c_str()); - REPORT_INNER_ERROR("E19999", "GetOpsProtoPath failed, %s is invalid.", path.c_str()); return; } opsproto_path = (path + "/op_proto/custom/" + ":") + (path + "/op_proto/built-in/"); @@ -283,7 +282,6 @@ graphStatus Impl::InferShapePrepare(const ComputeGraphPtr &compute_graph) { auto ret = prepare_infershape.Run(compute_graph); if ((ret != SUCCESS) && (ret != NOT_CHANGED)) { GELOGE(ret, "[Prepair][InferShape] failed, ret:%d", ret); - REPORT_CALL_ERROR("E19999", "PassManager::Run falied,ret:%d", ret); return ret; } GELOGD("Prepair for infershape success!"); @@ -315,7 +313,6 @@ graphStatus Impl::UpdateDataOpAttr(const Graph &graph) { if (op->GetType() == DATA) { if (UpdateDataOpShape(op, shape_map) != SUCCESS) { GELOGE(GRAPH_FAILED, "[Update][DataOpShape] op[%s] failed.", op->GetName().c_str()); - REPORT_CALL_ERROR("E19999", "UpdateDataOpShape failed, op[%s].", op->GetName().c_str()); return GRAPH_FAILED; } if (UpdateDataOpShapeRange(op, shape_range_map) != SUCCESS) { @@ -336,8 +333,6 @@ graphStatus Impl::CheckOptions(const std::map &options if (it_lx_fusion == ir_builder_supported_options_for_lx_fusion.end()) { GELOGE(GRAPH_PARAM_INVALID, "[Check][Options] unsupported option(%s).Please check!", ele.first.c_str()); - REPORT_INNER_ERROR("E19999", "CheckOptions failed, unsupported option(%s).Please check!", - ele.first.c_str()); return GRAPH_PARAM_INVALID; } } @@ -349,7 +344,6 @@ graphStatus Impl::CheckOptions(const std::map &options if (it != options_.end() && !(it->second.empty())) { if (build_mode_options.find(it->second) == build_mode_options.end()) { GELOGE(GRAPH_PARAM_INVALID, "[Check][Build Mode]:%s is unsupported. Please check!", it->second.c_str()); - REPORT_INNER_ERROR("E19999", "CheckOptions failed, %s is unsupported. Please check!", it->second.c_str()); return GRAPH_PARAM_INVALID; } build_mode = it->second; @@ -358,7 +352,6 @@ graphStatus Impl::CheckOptions(const std::map &options if (it != options_.end() && !(it->second.empty())) { if (build_step_options.find(it->second) == build_step_options.end()) { GELOGE(GRAPH_PARAM_INVALID, "[Check][Build Step]:%s is unsupported. Please check!", it->second.c_str()); - REPORT_INNER_ERROR("E19999", "CheckOptions failed, %s is unsupported. Please check!", it->second.c_str()); return GRAPH_PARAM_INVALID; } } else { @@ -417,7 +410,7 @@ graphStatus Impl::Init(const Graph &graph, const std::mapsecond; } else { - GELOGE(GRAPH_PARAM_INVALID, "[Check][Param]input_format %s not support , expect ND/NCHW/NHWC/CHWN/NC1HWC0/NHWC1C0.", + GELOGE(GRAPH_PARAM_INVALID, "[Check][Param] %s not support , expect ND/NCHW/NHWC/CHWN/NC1HWC0/NHWC1C0.", input_format.c_str()); - REPORT_INNER_ERROR("E19999", "InitDomiOmgContext failed, input_format %s not support.", input_format.c_str()); return GRAPH_PARAM_INVALID; } } @@ -573,7 +565,6 @@ graphStatus Impl::InitDomiOmgContext(const string &input_shape, const string &in if (!ParseInputShape(input_shape, omg_context_.input_dims, omg_context_.user_input_dims, is_dynamic_input)) { GELOGE(GRAPH_PARAM_INVALID, "[Parse][InputShape] Failed, shape: %s", input_shape.c_str()); - REPORT_CALL_ERROR("E19999", "ParseInputShape failed, shape: %s", input_shape.c_str()) return GRAPH_PARAM_INVALID; } return GRAPH_SUCCESS; @@ -625,7 +616,7 @@ graphStatus aclgrphSaveModel(const char *output_file, const ModelBufferData &mod return GRAPH_PARAM_INVALID; } if (output_file == nullptr) { - GELOGE(GRAPH_PARAM_INVALID, "[Check][output_file]file is nullptr."); + GELOGE(GRAPH_PARAM_INVALID, "[Check][Output_File]file is nullptr."); return GRAPH_PARAM_INVALID; } std::string str_output_file = output_file; @@ -685,7 +676,6 @@ graphStatus aclgrphDumpGraph(const ge::Graph &graph, const char *file, const siz char path[PATH_MAX] = {0}; if (realpath(file_path.c_str(), path) == nullptr) { GELOGE(GRAPH_PARAM_INVALID, "[Check][Dump File] path:%s is invalid.", file); - REPORT_INNER_ERROR("E19999", "aclgrphDumpGraph failed, %s is invalid.", file); return GRAPH_PARAM_INVALID; } @@ -745,7 +735,6 @@ graphStatus aclgrphGenerateForOp(const AscendString &op_type, const vector &options, std::string &lib_paths) { +Status OpsKernelBuilderManager::GetLibPaths(const std::map &options, std::string &lib_paths) { GELOGD("Start to execute GetLibPaths"); std::string path_base = PluginManager::GetPath(); std::string so_path = "plugin/opskernel/"; @@ -150,10 +151,10 @@ Status OpsKernelBuilderManager::GenerateTask(const Node &node, const std::string &lib_name = op_desc->GetOpKernelLibName(); auto it = ops_kernel_builders_.find(lib_name); if (it == ops_kernel_builders_.end()) { - GELOGE(INTERNAL_ERROR, "[Check][lib_name] libName = %s, node = %s not exist.", - lib_name.c_str(), op_desc->GetName().c_str()); - REPORT_INNER_ERROR("E19999", "GenerateTask failed, libName = %s, node = %s not exist.", - lib_name.c_str(), op_desc->GetName().c_str()); + GELOGE(INTERNAL_ERROR, "[Check][Lib_Name] libName = %s, node = %s not exist.", + lib_name.c_str(), op_desc->GetName().c_str()); + REPORT_INNER_ERROR("E19999", "GenerateTask failed, libName = %s, node = %s not exist.", + lib_name.c_str(), op_desc->GetName().c_str()); return INTERNAL_ERROR; } diff --git a/ge/opskernel_manager/ops_kernel_manager.cc b/ge/opskernel_manager/ops_kernel_manager.cc index 1a986b45..878726b4 100644 --- a/ge/opskernel_manager/ops_kernel_manager.cc +++ b/ge/opskernel_manager/ops_kernel_manager.cc @@ -57,7 +57,6 @@ Status OpsKernelManager::Initialize(const map &options_const) { Status ret = InitPluginOptions(options); if (ret != SUCCESS) { GELOGE(ret, "[Init][PluginOptions] parse pluginFlag from ge options failed."); - REPORT_CALL_ERROR("E19999", "InitPluginOptions failed, options invalid."); return ret; } @@ -87,7 +86,6 @@ Status OpsKernelManager::Initialize(const map &options_const) { Status rst0 = plugin_manager_.InvokeAll &, Status>(kInitialize, initialize_); if (rst0 == FAILED) { GELOGE(GE_OPS_GET_NO_VALID_SO, "[invoke][opskernelinfo]PluginManager InvokeAll failed."); - REPORT_INNER_ERROR("E19999", "PluginManager InvokeAll failed."); return GE_OPS_GET_NO_VALID_SO; } Status rst1 = @@ -117,19 +115,18 @@ Status OpsKernelManager::Initialize(const map &options_const) { ret = InitGraphOptimizerPriority(); if ((ret != SUCCESS)) { GELOGE(ret, "[Init][GraphOptimizerPriority] failed."); - REPORT_CALL_ERROR("E19999", "GraphOptimizerPriority failed."); return ret; } init_flag_ = true; return SUCCESS; } else { GELOGE(ret, "[Check][So file] not find any valid so file."); - REPORT_INNER_ERROR("E19999", "OpsKernelManager::Initialize failed, not find any valid so file."); return ret; } } -void OpsKernelManager::GetExternalEnginePath(std::string &extern_engine_path, const std::map& options) { +void OpsKernelManager::GetExternalEnginePath(std::string &extern_engine_path, + const std::map& options) { GELOGI("Enter get external engine so path schedule"); const char *path_env = std::getenv("ASCEND_ENGINE_PATH"); if (path_env != nullptr) { @@ -181,8 +178,8 @@ Status OpsKernelManager::ParsePluginOptions(const map &options, } else { GELOGE(GE_GRAPH_OPTIONS_INVALID, "[Check][Data]option_key:%s, its value %s is invalid, it must be 0 or 1.", plugin_name.c_str(), iter->second.c_str()); - REPORT_INNER_ERROR("E19999", "ParsePluginOptions failed, option_key:%s, its value %s is invalid, it must be 0 or 1.", - plugin_name.c_str(), iter->second.c_str()); + REPORT_INNER_ERROR("E19999", "ParsePluginOptions failed, option_key:%s, " + "its value %s is invalid, it must be 0 or 1.", plugin_name.c_str(), iter->second.c_str()); return GE_GRAPH_OPTIONS_INVALID; } } catch (std::invalid_argument &) { @@ -200,8 +197,8 @@ Status OpsKernelManager::ParsePluginOptions(const map &options, } catch (...) { GELOGE(GE_GRAPH_OPTIONS_INVALID, "[Check][Data]option_key:%s, its value %s is invalid, it must be 0 or 1.", plugin_name.c_str(), iter->second.c_str()); - REPORT_INNER_ERROR("E19999", "ParsePluginOptions failed,option_key:%s, its value %s is invalid, it must be 0 or 1.", - plugin_name.c_str(), iter->second.c_str()); + REPORT_INNER_ERROR("E19999", "ParsePluginOptions failed,option_key:%s, " + "its value %s is invalid, it must be 0 or 1.", plugin_name.c_str(), iter->second.c_str()); return GE_GRAPH_OPTIONS_INVALID; } } else { @@ -215,16 +212,16 @@ Status OpsKernelManager::ParsePluginOptions(const map &options, Status OpsKernelManager::CheckPluginPtr() const { for (auto iter = ops_kernel_store_.begin(); iter != ops_kernel_store_.end(); ++iter) { if (iter->second == nullptr) { - GELOGE(INTERNAL_ERROR, "[Check][PluginPtr] OpsKernelInfoStorePtr key=%s is null", iter->first.c_str()); - REPORT_INNER_ERROR("E19999", "CheckPluginPtr OpsKernelInfoStorePtr key=%s is null", iter->first.c_str()); - return FAILED; + GELOGE(INTERNAL_ERROR, "[Check][PluginPtr] OpsKernelInfoStorePtr key=%s is null", iter->first.c_str()); + REPORT_INNER_ERROR("E19999", "CheckPluginPtr OpsKernelInfoStorePtr key=%s is null", iter->first.c_str()); + return FAILED; } } for (auto iter1 = graph_optimizers_.begin(); iter1 != graph_optimizers_.end(); ++iter1) { if (iter1->second == nullptr) { - GELOGE(INTERNAL_ERROR, "[Check][PluginPtr] GraphOptimizerPtr key=%s is null", iter1->first.c_str()); - REPORT_INNER_ERROR("E19999", "GraphOptimizerPtr key=%s is null", iter1->first.c_str()); - return FAILED; + GELOGE(INTERNAL_ERROR, "[Check][PluginPtr] GraphOptimizerPtr key=%s is null", iter1->first.c_str()); + REPORT_INNER_ERROR("E19999", "GraphOptimizerPtr key=%s is null", iter1->first.c_str()); + return FAILED; } } return SUCCESS; @@ -236,9 +233,10 @@ Status OpsKernelManager::InitOpKernelInfoStores(const map &optio GELOGI("OpKernelInfoStore name: %s.", (it.first).c_str()); Status ret = it.second->Initialize(options); if (ret != SUCCESS) { - GELOGE(GE_OPS_KERNEL_STORE_INIT_FAILED, "[init][opKernelLib]OpKernelInfoStore: %s initialize failed.", (it.first).c_str()); - REPORT_CALL_ERROR("E19999", "OpKernelInfoStore: %s initialize failed.", (it.first).c_str()); - return GE_OPS_KERNEL_STORE_INIT_FAILED; + GELOGE(GE_OPS_KERNEL_STORE_INIT_FAILED, + "[Init][OpKernelLib]OpKernelInfoStore: %s initialize failed.", (it.first).c_str()); + REPORT_CALL_ERROR("E19999", "OpKernelInfoStore: %s initialize failed.", (it.first).c_str()); + return GE_OPS_KERNEL_STORE_INIT_FAILED; } } @@ -262,8 +260,7 @@ void OpsKernelManager::InitOpsKernelInfo() { } std::shared_ptr instance_ptr = ge::GELib::GetInstance(); if (instance_ptr == nullptr) { - GELOGE(GE_CLI_GE_NOT_INITIALIZED, "[get][GELib]malloc instance_ptr failed."); - REPORT_CALL_ERROR("E19999", "GELib::GetInstance failed."); + GELOGE(GE_CLI_GE_NOT_INITIALIZED, "[Get][GELib]malloc instance_ptr failed."); return; } // sort opinfo of ops_kernel_info_ @@ -308,7 +305,6 @@ Status OpsKernelManager::InitGraphOptimzers(const map &options) std::shared_ptr instance_ptr = ge::GELib::GetInstance(); if (instance_ptr == nullptr) { GELOGE(GE_CLI_GE_NOT_INITIALIZED, "[Get][GELib]malloc instance_ptr failed."); - REPORT_CALL_ERROR("E19999", "GELib::GetInstance failed."); return GE_CLI_GE_NOT_INITIALIZED; } if (!instance_ptr->DNNEngineManagerObj().IsEngineRegistered(attrs.engineName)) { @@ -317,7 +313,8 @@ Status OpsKernelManager::InitGraphOptimzers(const map &options) } Status ret = it.second->Initialize(options); if (ret != SUCCESS) { - GELOGE(GE_OPS_GRAPH_OPTIMIZER_INIT_FAILED, "[Init][GraphOptimzer]GraphOptimzer: %s initialize failed.", (it.first).c_str()); + GELOGE(GE_OPS_GRAPH_OPTIMIZER_INIT_FAILED, + "[Init][GraphOptimzer]GraphOptimzer: %s initialize failed.", (it.first).c_str()); REPORT_CALL_ERROR("E19999", "InitGraphOptimzers failed. %s initialize failed.", (it.first).c_str()); return GE_OPS_GRAPH_OPTIMIZER_INIT_FAILED; } @@ -463,9 +460,8 @@ Status OpsKernelManager::FinalizeOpsKernel() { GELOGI("ge invoke ops kernal finalize."); Status ret = plugin_manager_.InvokeAll(kFinalize); if (ret != SUCCESS) { - GELOGE(ret, "[Finalize][Check][Status] invoke Fe finalize failed."); - REPORT_CALL_ERROR("E19999", "PluginManager InvokeAll failed."); - return ret; + GELOGE(ret, "[Finalize][Check][Status] invoke Fe finalize failed."); + return ret; } return SUCCESS; diff --git a/ge/plugin/engine/engine_manage.cc b/ge/plugin/engine/engine_manage.cc index 2065fb6b..08b0640a 100644 --- a/ge/plugin/engine/engine_manage.cc +++ b/ge/plugin/engine/engine_manage.cc @@ -30,7 +30,6 @@ std::unique_ptr> EngineManager::engine_map_; Status EngineManager::RegisterEngine(const std::string &engine_name, DNNEnginePtr engine_ptr) { if (engine_ptr == nullptr) { GELOGE(FAILED, "[Register][Engine] failed, as input engine_ptr is nullptr"); - REPORT_INNER_ERROR("E19999", "RegisterEngine failed, as input engine_ptr is nullptr"); return FAILED; } @@ -66,7 +65,6 @@ void RegisterAiCoreEngine() { DNNEnginePtr aicore_engine_ptr = MakeShared(attr_aicore); if (aicore_engine_ptr == nullptr) { GELOGE(ge::FAILED, "[Register][AiCoreEngine] failed, as malloc shared_ptr failed."); - REPORT_INNER_ERROR("E19999", "RegisterAiCoreEngine failed, as malloc shared_ptr failed."); return; } if (EngineManager::RegisterEngine(ai_core, aicore_engine_ptr) != SUCCESS) { @@ -83,7 +81,6 @@ void RegisterVectorEngine() { DNNEnginePtr vectorcore_engine_ptr = MakeShared(attr_vector_core); if (vectorcore_engine_ptr == nullptr) { GELOGE(ge::FAILED, "[Register][VectorEngine] failed, as malloc shared_ptr failed."); - REPORT_INNER_ERROR("E19999", "RegisterVectorEngine failed, as malloc shared_ptr failed."); return; } if (EngineManager::RegisterEngine(vector_core, vectorcore_engine_ptr) != SUCCESS) { @@ -99,7 +96,6 @@ void RegisterAiCpuEngine() { DNNEnginePtr vm_engine_ptr = MakeShared(attr_aicpu); if (vm_engine_ptr == nullptr) { GELOGE(ge::FAILED, "[Register][AiCpuEngine] failed, as malloc shared_ptr failed."); - REPORT_INNER_ERROR("E19999", "RegisterAiCpuEngine failed, as malloc shared_ptr failed."); return; } if (EngineManager::RegisterEngine(vm_aicpu, vm_engine_ptr) != SUCCESS) { @@ -111,11 +107,11 @@ void RegisterAiCpuTFEngine() { const std::string vm_aicpu_tf = "DNN_VM_AICPU"; std::vector mem_type_aicpu_tf; mem_type_aicpu_tf.emplace_back(GE_ENGINE_ATTR_MEM_TYPE_HBM); - DNNEngineAttribute attr_aicpu_tf = {vm_aicpu_tf, mem_type_aicpu_tf, COST_2, DEVICE, FORMAT_RESERVED, FORMAT_RESERVED}; + DNNEngineAttribute attr_aicpu_tf = {vm_aicpu_tf, mem_type_aicpu_tf, COST_2, DEVICE, + FORMAT_RESERVED, FORMAT_RESERVED}; DNNEnginePtr vm_engine_ptr = MakeShared(attr_aicpu_tf); if (vm_engine_ptr == nullptr) { GELOGE(ge::FAILED, "[Register][AiCpuTFEngine] failed, as malloc shared_ptr failed."); - REPORT_INNER_ERROR("E19999", "RegisterAiCpuTFEngine failed, as malloc shared_ptr failed."); return; } if (EngineManager::RegisterEngine(vm_aicpu_tf, vm_engine_ptr) != SUCCESS) { @@ -132,7 +128,6 @@ void RegisterGeLocalEngine() { DNNEnginePtr ge_local_engine = MakeShared(attr_ge_local); if (ge_local_engine == nullptr) { GELOGE(ge::FAILED, "[Register][GeLocalEngine] failed, as malloc shared_ptr failed."); - REPORT_INNER_ERROR("E19999", "RegisterGeLocalEngine failed, as malloc shared_ptr failed."); return; } if (EngineManager::RegisterEngine(vm_ge_local, ge_local_engine) != SUCCESS) { @@ -145,11 +140,11 @@ void RegisterHostCpuEngine() { std::vector mem_type_host_cpu; mem_type_host_cpu.emplace_back(GE_ENGINE_ATTR_MEM_TYPE_HBM); // HostCpu use minimum priority, set it as 10 - DNNEngineAttribute attr_host_cpu = {vm_host_cpu, mem_type_host_cpu, COST_10, HOST, FORMAT_RESERVED, FORMAT_RESERVED}; + DNNEngineAttribute attr_host_cpu = {vm_host_cpu, mem_type_host_cpu, COST_10, + HOST, FORMAT_RESERVED, FORMAT_RESERVED}; DNNEnginePtr host_cpu_engine = MakeShared(attr_host_cpu); if (host_cpu_engine == nullptr) { GELOGE(ge::FAILED, "[Register][HostCpuEngine] failed, as malloc shared_ptr failed."); - REPORT_INNER_ERROR("E19999", "RegisterHostCpuEngine failed, as malloc shared_ptr failed."); return; } if (EngineManager::RegisterEngine(vm_host_cpu, host_cpu_engine) != SUCCESS) { @@ -165,7 +160,6 @@ void RegisterRtsEngine() { DNNEnginePtr rts_engine = MakeShared(attr_rts); if (rts_engine == nullptr) { GELOGE(ge::FAILED, "[Register][RtsEngine] failed, as malloc shared_ptr failed."); - REPORT_INNER_ERROR("E19999", "RegisterRtsEngine failed, as malloc shared_ptr failed."); return; } if (EngineManager::RegisterEngine(vm_rts, rts_engine) != SUCCESS) { @@ -181,7 +175,6 @@ void RegisterHcclEngine() { DNNEnginePtr hccl_engine = MakeShared(attr_hccl); if (hccl_engine == nullptr) { GELOGE(ge::FAILED, "[Register][HcclEngine] failed, as malloc shared_ptr failed."); - REPORT_INNER_ERROR("E19999", "RegisterHcclEngine failed, as malloc shared_ptr failed."); return; } if (EngineManager::RegisterEngine(dnn_hccl, hccl_engine) != SUCCESS) {