diff --git a/ge/common/dump/dump_op.cc b/ge/common/dump/dump_op.cc index 969c6431..5c768e22 100755 --- a/ge/common/dump/dump_op.cc +++ b/ge/common/dump/dump_op.cc @@ -99,8 +99,8 @@ Status DumpOp::DumpOutput(aicpu::dump::Task &task) { } int64_t output_size = 0; if (TensorUtils::GetTensorSizeInBytes(output_descs.at(i), output_size) != SUCCESS) { - GELOGE(ACL_ERROR_GE_DUMP_GET_TENSOR_SIZE_FAILED, "Get output size filed"); - return ACL_ERROR_GE_DUMP_GET_TENSOR_SIZE_FAILED; + GELOGE(ACL_ERROR_GE_INTERNAL_ERROR, "Get output size filed"); + return ACL_ERROR_GE_INTERNAL_ERROR; } GELOGD("Get output size in lanch dump op is %ld", output_size); output.set_size(output_size); @@ -126,8 +126,8 @@ Status DumpOp::DumpInput(aicpu::dump::Task &task) { } int64_t input_size = 0; if (TensorUtils::GetTensorSizeInBytes(input_descs.at(i), input_size) != SUCCESS) { - GELOGE(ACL_ERROR_GE_DUMP_GET_TENSOR_SIZE_FAILED, "Get output size filed"); - return ACL_ERROR_GE_DUMP_GET_TENSOR_SIZE_FAILED; + GELOGE(ACL_ERROR_GE_INTERNAL_ERROR, "Get output size filed"); + return ACL_ERROR_GE_INTERNAL_ERROR; } GELOGD("Get input size in lanch dump op is %ld", input_size); input.set_size(input_size); @@ -151,8 +151,8 @@ Status DumpOp::ExecutorDumpOp(aicpu::dump::OpMappingInfo &op_mapping_info) { size_t proto_size = op_mapping_info.ByteSizeLong(); bool ret = op_mapping_info.SerializeToString(&proto_msg); if (!ret || proto_size == 0) { - GELOGE(ACL_ERROR_GE_DUMP_PROTOBUF_SERIALIZE_FAILED, "Protobuf serialize failed, proto_size is %zu", proto_size); - return ACL_ERROR_GE_DUMP_PROTOBUF_SERIALIZE_FAILED; + GELOGE(ACL_ERROR_GE_INTERNAL_ERROR, "Protobuf serialize failed, proto_size is %zu", proto_size); + return ACL_ERROR_GE_INTERNAL_ERROR; } rtError_t rt_ret = rtMalloc(&proto_dev_mem_, proto_size, RT_MEMORY_HBM); @@ -209,10 +209,10 @@ Status DumpOp::LaunchDumpOp() { return RT_ERROR_TO_GE_STATUS(rt_ret); } if (device_id < 0) { - GELOGE(ACL_ERROR_GE_CHECK_RTS_RETURN_VALUE_FAILED, + GELOGE(ACL_ERROR_GE_INTERNAL_ERROR, "Check device_id failed, device_id = %d, which should be not less than 0.", device_id); - return ACL_ERROR_GE_CHECK_RTS_RETURN_VALUE_FAILED; + return ACL_ERROR_GE_INTERNAL_ERROR; } aicpu::dump::OpMappingInfo op_mapping_info; auto dump_path = dump_properties_.GetDumpPath() + std::to_string(device_id) + "/"; diff --git a/ge/common/helper/model_helper.cc b/ge/common/helper/model_helper.cc index 92f279be..0584f4b3 100644 --- a/ge/common/helper/model_helper.cc +++ b/ge/common/helper/model_helper.cc @@ -479,8 +479,8 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::LoadModel(c Status status = ge::DavinciModelParser::ParseModelContent(model_data, model_addr_tmp_, model_len_tmp_); if (status != SUCCESS) { - GELOGE(status, "Parse model content failed!"); - return status; + GELOGE(ACL_ERROR_GE_PARAM_INVALID, "Parse model content failed!"); + return ACL_ERROR_GE_PARAM_INVALID; } file_header_ = reinterpret_cast(model_data.model_data); @@ -528,8 +528,8 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::LoadRootMod Status status = ge::DavinciModelParser::ParseModelContent(model_data, model_addr_tmp_, model_len_tmp_); if (status != SUCCESS) { - GELOGE(status, "Parse model content failed!"); - return status; + GELOGE(ACL_ERROR_GE_PARAM_INVALID, "Parse model content failed!"); + return ACL_ERROR_GE_PARAM_INVALID; } file_header_ = reinterpret_cast(model_data.model_data); diff --git a/ge/graph/load/model_manager/model_manager.cc b/ge/graph/load/model_manager/model_manager.cc index 8be8b60f..2f7d326a 100755 --- a/ge/graph/load/model_manager/model_manager.cc +++ b/ge/graph/load/model_manager/model_manager.cc @@ -1428,7 +1428,7 @@ Status ModelManager::GetModelMemAndWeightSize(const ModelData &model, size_t &me uint8_t *model_data = nullptr; uint32_t model_len = 0; Status ret = DavinciModelParser::ParseModelContent(model, model_data, model_len); - GE_CHK_BOOL_TRUE_EXEC_WITH_LOG(ret != SUCCESS, return ret, "parse model content failed!"); + GE_CHK_BOOL_TRUE_EXEC_WITH_LOG(ret != SUCCESS, return ACL_ERROR_GE_PARAM_INVALID, "parse model content failed!"); OmFileLoadHelper om_file_helper; ret = om_file_helper.Init(model_data, model_len); diff --git a/ge/graph/manager/graph_mem_allocator.h b/ge/graph/manager/graph_mem_allocator.h index f0d83afd..d3468e75 100644 --- a/ge/graph/manager/graph_mem_allocator.h +++ b/ge/graph/manager/graph_mem_allocator.h @@ -203,7 +203,7 @@ class MemManager { return ACL_ERROR_GE_MEMORY_ALLOCATION; } else { if (allocator->Initialize() != SUCCESS) { - return ACL_ERROR_GE_INIT_ALLOCATOR_FAILED; + return ACL_ERROR_GE_INTERNAL_ERROR; } } } diff --git a/ge/session/omg.cc b/ge/session/omg.cc index 37b279a2..a1894d1a 100755 --- a/ge/session/omg.cc +++ b/ge/session/omg.cc @@ -1007,7 +1007,7 @@ FMK_FUNC_HOST_VISIBILITY Status ConvertOm(const char *model_file, const char *js } else { ErrorManager::GetInstance().ATCReportErrMessage("E10003", {"parameter", "value", "reason"}, {"om", model_file, "invalid om file"}); - GELOGE(PARAM_INVALID, "ParseModelContent failed because of invalid om file. Please check --om param."); + GELOGE(ACL_ERROR_GE_PARAM_INVALID, "ParseModelContent failed because of invalid om file. Please check --om param."); } if (model.model_data != nullptr) { diff --git a/ge/single_op/task/op_task.cc b/ge/single_op/task/op_task.cc index 8dfe1a78..933e7ba1 100755 --- a/ge/single_op/task/op_task.cc +++ b/ge/single_op/task/op_task.cc @@ -54,10 +54,10 @@ Status OpTask::OpenDump(rtStream_t stream) { size_t arg_num = 0; GetIoAddr(arg_base, arg_num); if (arg_num < input_size + output_size) { - GELOGE(ACL_ERROR_GE_DUMP_IO_ADDR_NUM_INVALID, "io_addrs_for_dump_ size %zu is not equal input and output size %zu", + GELOGE(ACL_ERROR_GE_INTERNAL_ERROR, "io_addrs_for_dump_ size %zu is not equal input and output size %zu", arg_num, input_size + output_size); - return ACL_ERROR_GE_DUMP_IO_ADDR_NUM_INVALID; + return ACL_ERROR_GE_INTERNAL_ERROR; } for (size_t i = 0; i < input_size; i++) { diff --git a/inc/external/ge/ge_api_error_codes.h b/inc/external/ge/ge_api_error_codes.h index 94be6b57..e77f817c 100644 --- a/inc/external/ge/ge_api_error_codes.h +++ b/inc/external/ge/ge_api_error_codes.h @@ -110,13 +110,12 @@ GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_AIPP_MODE_INVALID, "AIPP mode invalid."); GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_OP_TASK_TYPE_INVALID, "Task type invalid."); GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_OP_KERNEL_TYPE_INVALID, "Kernel type invalid."); GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_PLGMGR_PATH_INVALID, "Plugin path is invalid."); -GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_EXEC_MODEL_PARTITION_NUM_INVALID, "Number of model partition is invalid."); -GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_EXEC_MODEL_NOT_SUPPORT_ENCRYPTION, "Model not support encryption."); GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_TRANSSHAPE_FORMAT_INVALID, "Format is invalid when transferring shape."); GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_TRANSSHAPE_SHAPE_INVALID, "Shape is invalid when transferring shape."); GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_TRANSSHAPE_DATATYPE_INVALID, "Datatype is invalid when transferring shape."); GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_MEMORY_ALLOCATION, "Memory allocation error."); +GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, "Failed to operate memory."); GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_INTERNAL_ERROR, "Internal error."); GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_LOAD_MODEL, "Load model error."); @@ -128,12 +127,6 @@ GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_EXEC_RELEASE_MODEL_DATA, "Failed to release the GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_COMMAND_HANDLE, "Command handle error."); GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_GET_TENSOR_INFO, "Get tensor info error."); GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_UNLOAD_MODEL, "Load model error."); -GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_INIT_ALLOCATOR_FAILED, "Failed to init allocator."); -GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_CHECK_RTS_RETURN_VALUE_FAILED, "Get invalid return value from rts."); -GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_DUMP_IO_ADDR_NUM_INVALID, "Get invalid Io addr num for dump."); -GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_DUMP_GET_TENSOR_SIZE_FAILED, "Failed to get tensor size for dump."); -GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_DUMP_PROTOBUF_SERIALIZE_FAILED, "Failed to serialize protobuf for dump."); -GE_ERRORNO_EXTERNAL(ACL_ERROR_GE_MEMORY_OPERATE_FAILED, "Failed to operate memory."); } // namespace ge diff --git a/inc/external/ge/ge_error_codes.h b/inc/external/ge/ge_error_codes.h index 41d196b4..041fc7ae 100644 --- a/inc/external/ge/ge_error_codes.h +++ b/inc/external/ge/ge_error_codes.h @@ -39,12 +39,11 @@ static const uint32_t ACL_ERROR_GE_AIPP_MODE_INVALID = 145016; static const uint32_t ACL_ERROR_GE_OP_TASK_TYPE_INVALID = 145017; static const uint32_t ACL_ERROR_GE_OP_KERNEL_TYPE_INVALID = 145018; static const uint32_t ACL_ERROR_GE_PLGMGR_PATH_INVALID = 145019; -static const uint32_t ACL_ERROR_GE_EXEC_MODEL_NOT_SUPPORT_ENCRYPTION = 145020; -static const uint32_t ACL_ERROR_GE_EXEC_MODEL_PARTITION_NUM_INVALID = 145021; -static const uint32_t ACL_ERROR_GE_TRANSSHAPE_FORMAT_INVALID = 145022; -static const uint32_t ACL_ERROR_GE_TRANSSHAPE_SHAPE_INVALID = 145023; -static const uint32_t ACL_ERROR_GE_TRANSSHAPE_DATATYPE_INVALID = 145024; +static const uint32_t ACL_ERROR_GE_TRANSSHAPE_FORMAT_INVALID = 145020; +static const uint32_t ACL_ERROR_GE_TRANSSHAPE_SHAPE_INVALID = 145021; +static const uint32_t ACL_ERROR_GE_TRANSSHAPE_DATATYPE_INVALID = 145022; static const uint32_t ACL_ERROR_GE_MEMORY_ALLOCATION = 245000; +static const uint32_t ACL_ERROR_GE_MEMORY_OPERATE_FAILED = 245001; static const uint32_t ACL_ERROR_GE_INTERNAL_ERROR = 545000; static const uint32_t ACL_ERROR_GE_LOAD_MODEL = 545001; static const uint32_t ACL_ERROR_GE_EXEC_LOAD_MODEL_PARTITION_FAILED = 545002; @@ -55,12 +54,6 @@ static const uint32_t ACL_ERROR_GE_EXEC_RELEASE_MODEL_DATA = 545006; static const uint32_t ACL_ERROR_GE_COMMAND_HANDLE = 545007; static const uint32_t ACL_ERROR_GE_GET_TENSOR_INFO = 545008; static const uint32_t ACL_ERROR_GE_UNLOAD_MODEL = 545009; -static const uint32_t ACL_ERROR_GE_INIT_ALLOCATOR_FAILED = 545010; -static const uint32_t ACL_ERROR_GE_CHECK_RTS_RETURN_VALUE_FAILED = 545011; -static const uint32_t ACL_ERROR_GE_DUMP_IO_ADDR_NUM_INVALID = 545012; -static const uint32_t ACL_ERROR_GE_DUMP_GET_TENSOR_SIZE_FAILED = 545013; -static const uint32_t ACL_ERROR_GE_DUMP_PROTOBUF_SERIALIZE_FAILED = 545014; -static const uint32_t ACL_ERROR_GE_MEMORY_OPERATE_FAILED = 545015; #ifdef __cplusplus } // namespace ge