| @@ -34,8 +34,8 @@ Status HostCpuEngine::Initialize(const std::map<string, string> &options) { | |||||
| if (ops_kernel_store_ == nullptr) { | if (ops_kernel_store_ == nullptr) { | ||||
| ops_kernel_store_ = MakeShared<HostCpuOpsKernelInfoStore>(); | ops_kernel_store_ = MakeShared<HostCpuOpsKernelInfoStore>(); | ||||
| if (ops_kernel_store_ == nullptr) { | if (ops_kernel_store_ == nullptr) { | ||||
| GELOGE(FAILED, "[init][HostCpuEngine] Initialize failed. as malloc shared_ptr failed."); | |||||
| RRPORT_INNER_ERROR("E19999", "HostCpuEngine Initialize failed. as malloc shared_ptr failed."); | |||||
| GELOGE(FAILED, "[Init][HostCpuEngine] fail for new HostCpuOpsKernelInfoStore."); | |||||
| RRPORT_INNER_ERROR("E19999", "HostCpuEngine Initialize failed. fail for new HostCpuOpsKernelInfoStore."); | |||||
| return FAILED; | return FAILED; | ||||
| } | } | ||||
| } | } | ||||
| @@ -39,8 +39,9 @@ Status HostCpuOpsKernelBuilder::Initialize(const map<std::string, std::string> & | |||||
| Status HostCpuOpsKernelBuilder::CalcOpRunningParam(Node &ge_node) { | Status HostCpuOpsKernelBuilder::CalcOpRunningParam(Node &ge_node) { | ||||
| OpDescPtr op_desc = ge_node.GetOpDesc(); | OpDescPtr op_desc = ge_node.GetOpDesc(); | ||||
| if (op_desc == nullptr) { | if (op_desc == nullptr) { | ||||
| GELOGE(FAILED, "[get][opdes] OpDesc is nullptr, as input node's op desc is null."); | |||||
| REPORT_INNER_ERROR("E19999", "CalcOpRunningParam failed, as input param node GetOpDesc return nullptr."); | |||||
| GELOGE(FAILED, "[Check][Param:OpDesc]nullptr is invalid, node:%s.", ge_node->GetName().c_str()); | |||||
| REPORT_INNER_ERROR("E19999", "OpDesc is nullptr in node:%s, check invalid when CalcOpRunningParam", | |||||
| ge_node->GetName().c_str()); | |||||
| return FAILED; | return FAILED; | ||||
| } | } | ||||
| @@ -74,11 +75,10 @@ Status HostCpuOpsKernelBuilder::CalcOpRunningParam(Node &ge_node) { | |||||
| GeShape output_shape = output_tensor.GetShape(); | GeShape output_shape = output_tensor.GetShape(); | ||||
| if ((TensorUtils::CalcTensorMemSize(output_shape, format, data_type, output_mem_size) != GRAPH_SUCCESS) || | if ((TensorUtils::CalcTensorMemSize(output_shape, format, data_type, output_mem_size) != GRAPH_SUCCESS) || | ||||
| (output_mem_size < 0)) { | (output_mem_size < 0)) { | ||||
| GELOGE(FAILED, "CalcTensorMemSize failed."); | |||||
| GELOGE(FAILED, "[Calc][TensorMemSize] op[%s:%s] out[%zu] mem size failed, mem_size=%ld, format=%s, data_type=%s.", | |||||
| 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(), | name.c_str(), type.c_str(), i, output_mem_size, TypeUtils::FormatToSerialString(format).c_str(), | ||||
| TypeUtils::DataTypeToSerialString(data_type).c_str()); | TypeUtils::DataTypeToSerialString(data_type).c_str()); | ||||
| REPORT_CALL_ERROR("E19999", "CalcTensorMemSize failed. op[%s:%s] out[%zu] mem size failed, mem_size=%ld, format=%s, data_type=%s.", | |||||
| 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(), | name.c_str(), type.c_str(), i, output_mem_size, TypeUtils::FormatToSerialString(format).c_str(), | ||||
| TypeUtils::DataTypeToSerialString(data_type).c_str()); | TypeUtils::DataTypeToSerialString(data_type).c_str()); | ||||
| return FAILED; | return FAILED; | ||||
| @@ -89,10 +89,9 @@ Status HostCpuOpsKernelBuilder::CalcOpRunningParam(Node &ge_node) { | |||||
| TensorUtils::SetSize(output_tensor, output_mem_size); | TensorUtils::SetSize(output_tensor, output_mem_size); | ||||
| if (op_desc->UpdateOutputDesc(static_cast<uint32_t>(i), output_tensor) != GRAPH_SUCCESS) { | if (op_desc->UpdateOutputDesc(static_cast<uint32_t>(i), output_tensor) != GRAPH_SUCCESS) { | ||||
| GELOGE(FAILED, "UpdateOutputDesc failed."); | |||||
| GELOGE(FAILED, "[Update][OutputDesc] op[%s:%s] out[%zu] desc failed, format=%s, data_type=%s.", name.c_str(), type.c_str(), i, | |||||
| 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()); | TypeUtils::FormatToSerialString(format).c_str(), TypeUtils::DataTypeToSerialString(data_type).c_str()); | ||||
| REPORT_CALL_ERROR("E19999", "UpdateOutputDesc failed. op[%s:%s] out[%zu] desc failed, format=%s, data_type=%s.", name.c_str(), type.c_str(), i, | |||||
| 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()); | TypeUtils::FormatToSerialString(format).c_str(), TypeUtils::DataTypeToSerialString(data_type).c_str()); | ||||
| return FAILED; | return FAILED; | ||||
| } | } | ||||
| @@ -68,8 +68,7 @@ Status GELib::Initialize(const map<string, string> &options) { | |||||
| // Multiple initializations are not allowed | // Multiple initializations are not allowed | ||||
| instancePtr_ = MakeShared<GELib>(); | instancePtr_ = MakeShared<GELib>(); | ||||
| if (instancePtr_ == nullptr) { | if (instancePtr_ == nullptr) { | ||||
| GELOGE(GE_CLI_INIT_FAILED, "[init][GeLib] failed, as malloc shared_ptr failed."); | |||||
| REPORT_INNER_ERROR("E19999", "GeLib initialize failed, as malloc shared_ptr failed."); | |||||
| GELOGE(GE_CLI_INIT_FAILED, "[Init][GeLib] failed for new GELib."); | |||||
| return GE_CLI_INIT_FAILED; | return GE_CLI_INIT_FAILED; | ||||
| } | } | ||||
| @@ -77,15 +76,13 @@ Status GELib::Initialize(const map<string, string> &options) { | |||||
| map<string, string> new_options; | map<string, string> new_options; | ||||
| Status ret = instancePtr_->SetRTSocVersion(options, new_options); | Status ret = instancePtr_->SetRTSocVersion(options, new_options); | ||||
| if (ret != SUCCESS) { | if (ret != SUCCESS) { | ||||
| GELOGE(ret, "[set][RTSocVersion] failed, input options invalid."); | |||||
| REPORT_INNER_ERROR("E19999", "GeLib initial failed, as SetRTSocVersion failed."); | |||||
| GELOGE(ret, "[Set][RTSocVersion] failed."); | |||||
| return ret; | return ret; | ||||
| } | } | ||||
| ret = instancePtr_->SetAiCoreNum(new_options); | ret = instancePtr_->SetAiCoreNum(new_options); | ||||
| if (ret != SUCCESS) { | if (ret != SUCCESS) { | ||||
| GELOGE(ret, "[Set][AiCoreNum] failed, input options invalid."); | |||||
| REPORT_INNER_ERROR("E19999", "GeLib initial failed, as SetAiCoreNum failed."); | |||||
| GELOGE(ret, "[Set][AiCoreNum] failed."); | |||||
| return ret; | return ret; | ||||
| } | } | ||||
| @@ -100,8 +97,7 @@ Status GELib::Initialize(const map<string, string> &options) { | |||||
| GE_TIMESTAMP_START(Init); | GE_TIMESTAMP_START(Init); | ||||
| ret = instancePtr_->InnerInitialize(new_options); | ret = instancePtr_->InnerInitialize(new_options); | ||||
| if (ret != SUCCESS) { | if (ret != SUCCESS) { | ||||
| GELOGE(ret, "[init][GELib] failed, as options is invalid ."); | |||||
| REPORT_INNER_ERROR("E19999", "GeLib initial failed, as GELib::InnerInitialize failed."); | |||||
| GELOGE(ret, "[Init][GELib] failed."); | |||||
| instancePtr_ = nullptr; | instancePtr_ = nullptr; | ||||
| return ret; | return ret; | ||||
| } | } | ||||
| @@ -122,8 +118,7 @@ Status GELib::InnerInitialize(const map<string, string> &options) { | |||||
| Status initSystemStatus = SystemInitialize(options); | Status initSystemStatus = SystemInitialize(options); | ||||
| GE_TIMESTAMP_END(SystemInitialize, "InnerInitialize::SystemInitialize"); | GE_TIMESTAMP_END(SystemInitialize, "InnerInitialize::SystemInitialize"); | ||||
| if (initSystemStatus != SUCCESS) { | if (initSystemStatus != SUCCESS) { | ||||
| GELOGE(initSystemStatus, "[init][system]failed, as options invalid."); | |||||
| REPORT_INNER_ERROR("E19999", "GE system initial failed, as SystemInitialize failed."); | |||||
| GELOGE(initSystemStatus, "[Init][System]failed."); | |||||
| RollbackInit(); | RollbackInit(); | ||||
| return initSystemStatus; | return initSystemStatus; | ||||
| } | } | ||||
| @@ -146,8 +141,7 @@ Status GELib::InnerInitialize(const map<string, string> &options) { | |||||
| Status initOpsStatus = opsManager_.Initialize(options); | Status initOpsStatus = opsManager_.Initialize(options); | ||||
| GE_TIMESTAMP_END(OpsManagerInitialize, "InnerInitialize::OpsManagerInitialize"); | GE_TIMESTAMP_END(OpsManagerInitialize, "InnerInitialize::OpsManagerInitialize"); | ||||
| if (initOpsStatus != SUCCESS) { | if (initOpsStatus != SUCCESS) { | ||||
| GELOGE(initOpsStatus, "[init][OpsKernelManager] failed, options invalid. "); | |||||
| REPORT_INNER_ERROR("E19999", "GE ops manager initial failed. as call OpsKernelManager::Initialize failed. "); | |||||
| GELOGE(initOpsStatus, "[Init][OpsKernelManager] failed. "); | |||||
| RollbackInit(); | RollbackInit(); | ||||
| return initOpsStatus; | return initOpsStatus; | ||||
| } | } | ||||
| @@ -158,8 +152,7 @@ Status GELib::InnerInitialize(const map<string, string> &options) { | |||||
| Status initOpsBuilderStatus = OpsKernelBuilderManager::Instance().Initialize(options); | Status initOpsBuilderStatus = OpsKernelBuilderManager::Instance().Initialize(options); | ||||
| GE_TIMESTAMP_END(OpsKernelBuilderManagerInitialize, "InnerInitialize::OpsKernelBuilderManager"); | GE_TIMESTAMP_END(OpsKernelBuilderManagerInitialize, "InnerInitialize::OpsKernelBuilderManager"); | ||||
| if (initOpsBuilderStatus != SUCCESS) { | if (initOpsBuilderStatus != SUCCESS) { | ||||
| GELOGE(initOpsBuilderStatus, "[init][OpsKernelBuilderManager] failed, options invalid."); | |||||
| REPORT_INNER_ERROR("E19999", "GE ops buildermanager initial failed, as call OpsKernelBuilderManager::Initialize failed."); | |||||
| GELOGE(initOpsBuilderStatus, "[Init][OpsKernelBuilderManager] failed."); | |||||
| RollbackInit(); | RollbackInit(); | ||||
| return initOpsBuilderStatus; | return initOpsBuilderStatus; | ||||
| } | } | ||||
| @@ -170,8 +163,7 @@ Status GELib::InnerInitialize(const map<string, string> &options) { | |||||
| Status initSmStatus = sessionManager_.Initialize(options); | Status initSmStatus = sessionManager_.Initialize(options); | ||||
| GE_TIMESTAMP_END(SessionManagerInitialize, "InnerInitialize::SessionManagerInitialize"); | GE_TIMESTAMP_END(SessionManagerInitialize, "InnerInitialize::SessionManagerInitialize"); | ||||
| if (initSmStatus != SUCCESS) { | if (initSmStatus != SUCCESS) { | ||||
| GELOGE(initSmStatus, "[init][SessionManager] failed, options invalid."); | |||||
| REPORT_INNER_ERROR("E19999", "GE session manager initial failed. as SessionManager::Initialize failed."); | |||||
| GELOGE(initSmStatus, "[Init][SessionManager] failed."); | |||||
| RollbackInit(); | RollbackInit(); | ||||
| return initSmStatus; | return initSmStatus; | ||||
| } | } | ||||
| @@ -181,7 +173,7 @@ Status GELib::InnerInitialize(const map<string, string> &options) { | |||||
| Status initHostCpuEngineStatus = HostCpuEngine::GetInstance().Initialize(); | Status initHostCpuEngineStatus = HostCpuEngine::GetInstance().Initialize(); | ||||
| GE_TIMESTAMP_END(HostCpuEngineInitialize, "InnerInitialize::HostCpuEngineInitialize"); | GE_TIMESTAMP_END(HostCpuEngineInitialize, "InnerInitialize::HostCpuEngineInitialize"); | ||||
| if (initHostCpuEngineStatus != SUCCESS) { | if (initHostCpuEngineStatus != SUCCESS) { | ||||
| GELOGE(initHostCpuEngineStatus, "Failed to initialize HostCpuEngine"); | |||||
| GELOGE(initHostCpuEngineStatus, "[Init][HostCpuEngine] failed."); | |||||
| RollbackInit(); | RollbackInit(); | ||||
| return initHostCpuEngineStatus; | return initHostCpuEngineStatus; | ||||
| } | } | ||||
| @@ -189,7 +181,7 @@ Status GELib::InnerInitialize(const map<string, string> &options) { | |||||
| GELOGI("Start to init Analyzer!"); | GELOGI("Start to init Analyzer!"); | ||||
| Status init_analyzer_status = ge::Analyzer::GetInstance()->Initialize(); | Status init_analyzer_status = ge::Analyzer::GetInstance()->Initialize(); | ||||
| if (init_analyzer_status != SUCCESS) { | if (init_analyzer_status != SUCCESS) { | ||||
| GELOGE(init_analyzer_status, "Failed to initialize HostCpuEngine"); | |||||
| GELOGE(init_analyzer_status, "[Init][HostCpuEngine] failed."); | |||||
| RollbackInit(); | RollbackInit(); | ||||
| return init_analyzer_status; | return init_analyzer_status; | ||||
| } | } | ||||
| @@ -214,8 +206,7 @@ Status GELib::SystemInitialize(const map<string, string> &options) { | |||||
| auto model_manager = ModelManager::GetInstance(); | auto model_manager = ModelManager::GetInstance(); | ||||
| GE_CHECK_NOTNULL(model_manager); | GE_CHECK_NOTNULL(model_manager); | ||||
| GE_IF_BOOL_EXEC(model_manager->EnableExceptionDump(options) != SUCCESS, | GE_IF_BOOL_EXEC(model_manager->EnableExceptionDump(options) != SUCCESS, | ||||
| REPORT_INNER_ERROR("E19999", "ModelManager EnableExceptionDump failed, options invalid."); | |||||
| GELOGE(FAILED, "[check][ModelManager][EnableExceptionDump] failed, options invalid."); | |||||
| GELOGE(FAILED, "[Enable][ExceptionDump] failed."); | |||||
| return FAILED); | return FAILED); | ||||
| // 1.`is_train_mode_` means case: train | // 1.`is_train_mode_` means case: train | ||||
| // 2.`(!is_train_mode_) && (options_.device_id != kDefaultDeviceIdForInfer)` means case: online infer | // 2.`(!is_train_mode_) && (options_.device_id != kDefaultDeviceIdForInfer)` means case: online infer | ||||
| @@ -269,9 +260,7 @@ Status GELib::SetRTSocVersion(const map<string, string> &options, map<string, st | |||||
| GELOGI("SOC_VERSION is not exist in options"); | GELOGI("SOC_VERSION is not exist in options"); | ||||
| char version[kSocVersionLen] = {0}; | char version[kSocVersionLen] = {0}; | ||||
| rtError_t rt_ret = rtGetSocVersion(version, kSocVersionLen); | rtError_t rt_ret = rtGetSocVersion(version, kSocVersionLen); | ||||
| GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, | |||||
| REPORT_CALL_ERROR("E19999","rtGetSocVersion failed."); | |||||
| GELOGE(rt_ret, "[get][SocVersion] failed."); return FAILED;) | |||||
| GE_IF_BOOL_EXEC(rt_ret != RT_ERROR_NONE, GELOGE(rt_ret, "[Get][SocVersion] failed."); return FAILED;) | |||||
| GELOGI("Succeeded in getting SOC_VERSION[%s] from runtime.", version); | GELOGI("Succeeded in getting SOC_VERSION[%s] from runtime.", version); | ||||
| new_options.insert(std::make_pair(ge::SOC_VERSION, version)); | new_options.insert(std::make_pair(ge::SOC_VERSION, version)); | ||||
| } | } | ||||
| @@ -292,8 +281,7 @@ Status GELib::SetAiCoreNum(map<string, string> &options) { | |||||
| options.emplace(std::make_pair(AICORE_NUM, std::to_string(aicore_num))); | options.emplace(std::make_pair(AICORE_NUM, std::to_string(aicore_num))); | ||||
| return SUCCESS; | return SUCCESS; | ||||
| } | } | ||||
| GELOGE(FAILED, "[get][AiCoreCount] failed."); | |||||
| REPORT_CALL_ERROR("E19999", "rtGetAiCoreCount failed."); | |||||
| GELOGE(FAILED, "[Get][AiCoreCount] failed."); | |||||
| return FAILED; | return FAILED; | ||||
| } | } | ||||
| @@ -368,7 +356,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status GELib::InitSystemWithOpt | |||||
| mem_type.push_back(RT_MEMORY_P2P_DDR); | mem_type.push_back(RT_MEMORY_P2P_DDR); | ||||
| Status initMmStatus = MemManager::Instance().Initialize(mem_type); | Status initMmStatus = MemManager::Instance().Initialize(mem_type); | ||||
| if (initMmStatus != SUCCESS) { | if (initMmStatus != SUCCESS) { | ||||
| GELOGE(initMmStatus, "[Init][MemManager] MemoryAllocatorManager initialize failed."); | |||||
| GELOGE(initMmStatus, "[Init][MemManager] failed."); | |||||
| return initMmStatus; | return initMmStatus; | ||||
| } | } | ||||
| @@ -376,7 +364,8 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status GELib::InitSystemWithOpt | |||||
| // Update CSA file | // Update CSA file | ||||
| CsaInteract::GetInstance().Init(options.device_id, GetContext().TraceId()); | CsaInteract::GetInstance().Init(options.device_id, GetContext().TraceId()); | ||||
| Status ret = CsaInteract::GetInstance().WriteJobState(JOBSTATE_RUNNING, JOBSUBSTATE_ENV_INIT); | Status ret = CsaInteract::GetInstance().WriteJobState(JOBSTATE_RUNNING, JOBSUBSTATE_ENV_INIT); | ||||
| GE_LOGE_IF(ret != SUCCESS, "[write] [job state] failed, ret:%u", ret); | |||||
| 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 | // set device id | ||||
| GELOGI("set logical device id:%u", options.device_id); | GELOGI("set logical device id:%u", options.device_id); | ||||
| @@ -407,7 +396,7 @@ Status GELib::SystemShutdownWithOptions(const Options &options) { | |||||
| // Update CSA file | // Update CSA file | ||||
| Status ret = CsaInteract::GetInstance().WriteJobState(JOBSTATE_SUCCEED); | Status ret = CsaInteract::GetInstance().WriteJobState(JOBSTATE_SUCCEED); | ||||
| GE_LOGE_IF(ret != SUCCESS, "[write] [job state] failed, ret:%u", ret); | |||||
| GE_LOGE_IF(ret != SUCCESS, "[Write][JobState] failed, ret:%u jobstate_succeed=%d.", ret, JOBSTATE_SUCCEED); | |||||
| is_system_inited = false; | is_system_inited = false; | ||||
| is_shutdown = true; | is_shutdown = true; | ||||
| @@ -423,7 +412,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status GELib::InitSystemWithout | |||||
| mem_type.push_back(RT_MEMORY_P2P_DDR); | mem_type.push_back(RT_MEMORY_P2P_DDR); | ||||
| Status initMmStatus = MemManager::Instance().Initialize(mem_type); | Status initMmStatus = MemManager::Instance().Initialize(mem_type); | ||||
| if (initMmStatus != SUCCESS) { | if (initMmStatus != SUCCESS) { | ||||
| GELOGE(initMmStatus, "[Initialize][MemManager] MemoryAllocatorManager initialize failed."); | |||||
| GELOGE(initMmStatus, "[Init][MemManager] failed."); | |||||
| return initMmStatus; | return initMmStatus; | ||||
| } | } | ||||
| GE_CHK_STATUS_RET(HostMemManager::Instance().Initialize()); | GE_CHK_STATUS_RET(HostMemManager::Instance().Initialize()); | ||||
| @@ -519,8 +508,8 @@ Status GELib::Finalize() { | |||||
| instancePtr_ = nullptr; | instancePtr_ = nullptr; | ||||
| init_flag_ = false; | init_flag_ = false; | ||||
| if (final_state != SUCCESS) { | if (final_state != SUCCESS) { | ||||
| GELOGE(FAILED, "[check][state]finalization failed."); | |||||
| REPORT_INNER_ERROR("E19999", "GELib::Finalize finalization failed."); | |||||
| GELOGE(FAILED, "[Check][State]finalization failed."); | |||||
| REPORT_INNER_ERROR("E19999", "GELib::Finalize finalization failed because no init before."); | |||||
| return final_state; | return final_state; | ||||
| } | } | ||||
| GELOGI("finalization success."); | GELOGI("finalization success."); | ||||
| @@ -78,7 +78,7 @@ void CsaInteract::Init(int32_t dev_index, int64_t job_id) { | |||||
| Status CsaInteract::WriteJobState(JobState job_state, JobSubState job_sub_state, uint32_t module_ret_errcode, | Status CsaInteract::WriteJobState(JobState job_state, JobSubState job_sub_state, uint32_t module_ret_errcode, | ||||
| ErrorModule error_module) { | ErrorModule error_module) { | ||||
| if (!is_init_) { | if (!is_init_) { | ||||
| GELOGE(INTERNAL_ERROR, "[init][CsaInteract] obj has not init, can't WriteJobState"); | |||||
| GELOGE(INTERNAL_ERROR, "[Init][CsaInteract] obj has not init, can't WriteJobState"); | |||||
| REPORT_INNER_ERROR("E19999", "CsaInteracthas not init, can't WriteJobState"); | REPORT_INNER_ERROR("E19999", "CsaInteracthas not init, can't WriteJobState"); | ||||
| return INTERNAL_ERROR; | return INTERNAL_ERROR; | ||||
| } | } | ||||
| @@ -108,8 +108,8 @@ Status CsaInteract::WriteJobState(JobState job_state, JobSubState job_sub_state, | |||||
| content = content_json.dump(); | content = content_json.dump(); | ||||
| } catch (const nlohmann::json::exception &e) { | } catch (const nlohmann::json::exception &e) { | ||||
| GELOGE(INTERNAL_ERROR, "[create] [json object] exception:%s job_state:%u", e.what(), job_state); | |||||
| REPORT_INNER_ERROR("E19999", "create json object failed. exception:%s job_state:%u", e.what(), job_state); | |||||
| GELOGE(INTERNAL_ERROR, "[Create] [JsonObject] exception:%s job_state:%u job_sub_state:%u.", e.what(), job_state,job_sub_state); | |||||
| REPORT_INNER_ERROR("E19999", "Create json object failed. exception:%s job_state:%u job_sub_state:%u", e.what(), job_state,job_sub_state); | |||||
| return INTERNAL_ERROR; | return INTERNAL_ERROR; | ||||
| } | } | ||||
| @@ -195,37 +195,32 @@ Status CsaInteract::WriteFile(const std::string &file_name, const std::string &c | |||||
| int32_t fd = mmOpen2(file_name.c_str(), flags, M_IRUSR | M_IWUSR | M_UMASK_GRPREAD); | int32_t fd = mmOpen2(file_name.c_str(), flags, M_IRUSR | M_IWUSR | M_UMASK_GRPREAD); | ||||
| if (fd == EN_ERROR) { | if (fd == EN_ERROR) { | ||||
| if (MakePath(file_name) != SUCCESS) { | if (MakePath(file_name) != SUCCESS) { | ||||
| GELOGE(INTERNAL_ERROR, "MakePath failed."); | |||||
| GELOGE(INTERNAL_ERROR, "[create] [file path] errno is %d", errno); | |||||
| GELOGE(INTERNAL_ERROR, "[Create][File Path] errno is %d", errno); | |||||
| REPORT_CALL_ERROR("E19999", "MakePath failed. errno is %d", errno); | REPORT_CALL_ERROR("E19999", "MakePath failed. errno is %d", errno); | ||||
| return INTERNAL_ERROR; | return INTERNAL_ERROR; | ||||
| } | } | ||||
| fd = mmOpen2(file_name.c_str(), flags, M_IRUSR | M_IWUSR | M_UMASK_GRPREAD); | fd = mmOpen2(file_name.c_str(), flags, M_IRUSR | M_IWUSR | M_UMASK_GRPREAD); | ||||
| if (fd == EN_ERROR) { | if (fd == EN_ERROR) { | ||||
| GELOGE(INTERNAL_ERROR, "mmOpen2 failed."); | |||||
| GELOGE(INTERNAL_ERROR, "[open] [file] errno is %d", errno); | |||||
| REPORT_CALL_ERROR("E19999", "mmOpen2 failed. errno is %d", errno); | |||||
| GELOGE(INTERNAL_ERROR, "[Open][File] errno is %d file_name: %s", errno, file_name.c_str()); | |||||
| REPORT_CALL_ERROR("E19999", "mmOpen2 failed. errno is %d file_name: %s", errno, file_name.c_str()); | |||||
| return INTERNAL_ERROR; | return INTERNAL_ERROR; | ||||
| } | } | ||||
| } | } | ||||
| mmSsize_t ret = mmWrite(fd, reinterpret_cast<void *>(const_cast<char *>(content.c_str())), content.length()); | mmSsize_t ret = mmWrite(fd, reinterpret_cast<void *>(const_cast<char *>(content.c_str())), content.length()); | ||||
| if (ret == EN_ERROR) { | if (ret == EN_ERROR) { | ||||
| GELOGE(INTERNAL_ERROR, "mmWrite failed."); | |||||
| GELOGE(INTERNAL_ERROR, "[write] [file] errno is %d", errno); | |||||
| GELOGE(INTERNAL_ERROR, "[Write][File] errno is %d", errno); | |||||
| REPORT_CALL_ERROR("E19999", "mmWrite failed. errno is %d", errno); | REPORT_CALL_ERROR("E19999", "mmWrite failed. errno is %d", errno); | ||||
| ret = mmClose(fd); | ret = mmClose(fd); | ||||
| if (ret == EN_ERROR) { | if (ret == EN_ERROR) { | ||||
| GELOGE(INTERNAL_ERROR, "mmClose failed."); | |||||
| GELOGE(INTERNAL_ERROR, "[close] [file] error is %d", errno); | |||||
| GELOGE(INTERNAL_ERROR, "[Close][File] error is %d", errno); | |||||
| REPORT_CALL_ERROR("E19999", "mmClose failed. error is %d", errno); | REPORT_CALL_ERROR("E19999", "mmClose failed. error is %d", errno); | ||||
| } | } | ||||
| return INTERNAL_ERROR; | return INTERNAL_ERROR; | ||||
| } | } | ||||
| ret = mmClose(fd); | ret = mmClose(fd); | ||||
| if (ret == EN_ERROR) { | if (ret == EN_ERROR) { | ||||
| GELOGE(INTERNAL_ERROR, "mmClose failed."); | |||||
| GELOGE(INTERNAL_ERROR, "[close] [file] error is %d", errno); | |||||
| GELOGE(INTERNAL_ERROR, "[Close][File] error is %d", errno); | |||||
| REPORT_CALL_ERROR("E19999", "mmClose failed. error is %d", errno); | REPORT_CALL_ERROR("E19999", "mmClose failed. error is %d", errno); | ||||
| return INTERNAL_ERROR; | return INTERNAL_ERROR; | ||||
| } | } | ||||
| @@ -255,9 +250,8 @@ Status CsaInteract::MakePath(const std::string &file_name) { | |||||
| std::string pre_path = file_path.substr(0, found + 1); | std::string pre_path = file_path.substr(0, found + 1); | ||||
| if (mmAccess(pre_path.c_str()) != EN_OK) { | if (mmAccess(pre_path.c_str()) != EN_OK) { | ||||
| if (mmMkdir(pre_path.c_str(), M_IRWXU) != EN_OK) { | if (mmMkdir(pre_path.c_str(), M_IRWXU) != EN_OK) { | ||||
| GELOGE(INTERNAL_ERROR, "mmMkdir failed."); | |||||
| GELOGE(INTERNAL_ERROR, "csainteract mkdir fail, errno is %d", errno); | |||||
| REPORT_CALL_ERROR("E19999", "mmMkdir failed. mkdir fail, errno is %d", errno); | |||||
| GELOGE(INTERNAL_ERROR, "[Create][File Dir] fail, errno is %d, pri_path:%s", errno, pri_path.c_str()); | |||||
| REPORT_CALL_ERROR("E19999", "mmMkdir failed. errno is %d pri_path:%s", errno, pri_path.c_str()); | |||||
| return INTERNAL_ERROR; | return INTERNAL_ERROR; | ||||
| } | } | ||||
| } | } | ||||
| @@ -51,7 +51,7 @@ Status OpsKernelBuilderManager::Initialize(const map<std::string, std::string> & | |||||
| plugin_manager_.reset(new (std::nothrow)PluginManager()); | plugin_manager_.reset(new (std::nothrow)PluginManager()); | ||||
| GE_CHECK_NOTNULL(plugin_manager_); | GE_CHECK_NOTNULL(plugin_manager_); | ||||
| GE_CHK_STATUS_RET(plugin_manager_->LoadSo(lib_paths), | GE_CHK_STATUS_RET(plugin_manager_->LoadSo(lib_paths), | ||||
| "[load][libs]Failed, lib_paths=%s.", lib_paths.c_str()); | |||||
| "[Load][Libs]Failed, lib_paths=%s.", lib_paths.c_str()); | |||||
| } | } | ||||
| auto &kernel_builders = OpsKernelBuilderRegistry::GetInstance().GetAll(); | auto &kernel_builders = OpsKernelBuilderRegistry::GetInstance().GetAll(); | ||||
| @@ -62,8 +62,7 @@ Status OpsKernelBuilderManager::Initialize(const map<std::string, std::string> & | |||||
| GELOGI("Initialize ops kernel util for %s", kernel_lib_name.c_str()); | GELOGI("Initialize ops kernel util for %s", kernel_lib_name.c_str()); | ||||
| GE_CHECK_NOTNULL(it.second); | GE_CHECK_NOTNULL(it.second); | ||||
| GE_CHK_STATUS_RET(it.second->Initialize(options), | GE_CHK_STATUS_RET(it.second->Initialize(options), | ||||
| "[invoke][Initialize]failed, kernel lib name = %s", | |||||
| kernel_lib_name.c_str()); | |||||
| "[Invoke][Initialize]failed, kernel lib name = %s", kernel_lib_name.c_str()); | |||||
| ops_kernel_builders_.emplace(kernel_lib_name, it.second); | ops_kernel_builders_.emplace(kernel_lib_name, it.second); | ||||
| } | } | ||||
| @@ -129,21 +128,16 @@ Status OpsKernelBuilderManager::CalcOpRunningParam(Node &node) const { | |||||
| const std::string &lib_name = op_desc->GetOpKernelLibName(); | const std::string &lib_name = op_desc->GetOpKernelLibName(); | ||||
| auto it = ops_kernel_builders_.find(lib_name); | auto it = ops_kernel_builders_.find(lib_name); | ||||
| if (it == ops_kernel_builders_.end()) { | if (it == ops_kernel_builders_.end()) { | ||||
| GELOGE(INTERNAL_ERROR, "OpKernelLibName failed."); | |||||
| GELOGE(INTERNAL_ERROR,"[Check][lib_name] 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", "CalcOpRunningParam failed, libName = %s, node = %s not exist.", | REPORT_INNER_ERROR("E19999", "CalcOpRunningParam failed, libName = %s, node = %s not exist.", | ||||
| lib_name.c_str(), | |||||
| op_desc->GetName().c_str()); | |||||
| lib_name.c_str(), op_desc->GetName().c_str()); | |||||
| return INTERNAL_ERROR; | return INTERNAL_ERROR; | ||||
| } | } | ||||
| GELOGD("To invoke CalcOpRunningParam, node = %s, lib name = %s", op_desc->GetName().c_str(), lib_name.c_str()); | GELOGD("To invoke CalcOpRunningParam, node = %s, lib name = %s", op_desc->GetName().c_str(), lib_name.c_str()); | ||||
| GE_CHK_STATUS_RET(it->second->CalcOpRunningParam(node), | GE_CHK_STATUS_RET(it->second->CalcOpRunningParam(node), | ||||
| "[invoke] [CalcOpRunningParam]failed, libName = %s, node = %s", | |||||
| lib_name.c_str(), | |||||
| op_desc->GetName().c_str()); | |||||
| "[Invoke][CalcOpRunningParam]failed, libName = %s, node = %s", lib_name.c_str(), op_desc->GetName().c_str()); | |||||
| GELOGD("Done invoking CalcOpRunningParam successfully"); | GELOGD("Done invoking CalcOpRunningParam successfully"); | ||||
| return SUCCESS; | return SUCCESS; | ||||
| } | } | ||||
| @@ -156,22 +150,16 @@ Status OpsKernelBuilderManager::GenerateTask(const Node &node, | |||||
| const std::string &lib_name = op_desc->GetOpKernelLibName(); | const std::string &lib_name = op_desc->GetOpKernelLibName(); | ||||
| auto it = ops_kernel_builders_.find(lib_name); | auto it = ops_kernel_builders_.find(lib_name); | ||||
| if (it == ops_kernel_builders_.end()) { | if (it == ops_kernel_builders_.end()) { | ||||
| GELOGE(INTERNAL_ERROR, "GenerateTask failed."); | |||||
| 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; | return INTERNAL_ERROR; | ||||
| } | } | ||||
| GELOGD("To invoke GenerateTask, node = %s, lib name = %s", op_desc->GetName().c_str(), lib_name.c_str()); | GELOGD("To invoke GenerateTask, node = %s, lib name = %s", op_desc->GetName().c_str(), lib_name.c_str()); | ||||
| GE_CHK_STATUS_RET(it->second->GenerateTask(node, context, tasks), | GE_CHK_STATUS_RET(it->second->GenerateTask(node, context, tasks), | ||||
| "[invoke][GenerateTask]failed, libName = %s, node = %s", | |||||
| lib_name.c_str(), | |||||
| op_desc->GetName().c_str()); | |||||
| "[Invoke][GenerateTask]failed, libName = %s, node = %s", lib_name.c_str(), op_desc->GetName().c_str()); | |||||
| GELOGD("Done invoking GenerateTask successfully"); | GELOGD("Done invoking GenerateTask successfully"); | ||||
| return SUCCESS; | return SUCCESS; | ||||
| } | } | ||||
| @@ -123,7 +123,7 @@ Status OpsKernelManager::Initialize(const map<string, string> &options_const) { | |||||
| init_flag_ = true; | init_flag_ = true; | ||||
| return SUCCESS; | return SUCCESS; | ||||
| } else { | } else { | ||||
| GELOGE(ret, "[check][so file] not find any valid so file."); | |||||
| GELOGE(ret, "[Check][So file] not find any valid so file."); | |||||
| REPORT_INNER_ERROR("E19999", "OpsKernelManager::Initialize failed, not find any valid so file."); | REPORT_INNER_ERROR("E19999", "OpsKernelManager::Initialize failed, not find any valid so file."); | ||||
| return ret; | return ret; | ||||
| } | } | ||||
| @@ -179,33 +179,29 @@ Status OpsKernelManager::ParsePluginOptions(const map<string, string> &options, | |||||
| } else if (flag == 1) { | } else if (flag == 1) { | ||||
| enable_flag = true; | enable_flag = true; | ||||
| } else { | } else { | ||||
| GELOGE(GE_GRAPH_OPTIONS_INVALID, "ParsePluginOptions failed."); | |||||
| 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()); | |||||
| 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.", | 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()); | |||||
| plugin_name.c_str(), iter->second.c_str()); | |||||
| return GE_GRAPH_OPTIONS_INVALID; | return GE_GRAPH_OPTIONS_INVALID; | ||||
| } | } | ||||
| } catch (std::invalid_argument &) { | } catch (std::invalid_argument &) { | ||||
| GELOGE(GE_GRAPH_OPTIONS_INVALID, "ParsePluginOptions failed."); | |||||
| GELOGE(GE_GRAPH_OPTIONS_INVALID, "[check][data]option_key:ge.feFlag, its value %s is invalid_argument, it must be 0 or 1.", | |||||
| iter->second.c_str()); | |||||
| GELOGE(GE_GRAPH_OPTIONS_INVALID, "[Check][Data] failed, its value %s is invalid_argument, it must be 0 or 1.", | |||||
| iter->second.c_str()); | |||||
| REPORT_INNER_ERROR("E19999", "ParsePluginOptions failed,its value %s is invalid_argument, it must be 0 or 1.", | REPORT_INNER_ERROR("E19999", "ParsePluginOptions failed,its value %s is invalid_argument, it must be 0 or 1.", | ||||
| iter->second.c_str()); | |||||
| iter->second.c_str()); | |||||
| return GE_GRAPH_OPTIONS_INVALID; | return GE_GRAPH_OPTIONS_INVALID; | ||||
| } catch (std::out_of_range &) { | } catch (std::out_of_range &) { | ||||
| GELOGE(GE_GRAPH_OPTIONS_INVALID, "ParsePluginOptions failed."); | |||||
| GELOGE(GE_GRAPH_OPTIONS_INVALID, "[check][data]option_key:ge.feFlag, its value %s is out of range, it must be 0 or 1.", | |||||
| iter->second.c_str()); | |||||
| GELOGE(GE_GRAPH_OPTIONS_INVALID, "[Check][Data]failed, its value %s is out of range, it must be 0 or 1.", | |||||
| iter->second.c_str()); | |||||
| REPORT_INNER_ERROR("E19999", "ParsePluginOptions failed,its value %s is out of range, it must be 0 or 1.", | REPORT_INNER_ERROR("E19999", "ParsePluginOptions failed,its value %s is out of range, it must be 0 or 1.", | ||||
| iter->second.c_str()); | |||||
| iter->second.c_str()); | |||||
| return GE_GRAPH_OPTIONS_INVALID; | return GE_GRAPH_OPTIONS_INVALID; | ||||
| } catch (...) { | } catch (...) { | ||||
| GELOGE(GE_GRAPH_OPTIONS_INVALID, "ParsePluginOptions failed."); | |||||
| 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()); | |||||
| 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.", | 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()); | |||||
| plugin_name.c_str(), iter->second.c_str()); | |||||
| return GE_GRAPH_OPTIONS_INVALID; | return GE_GRAPH_OPTIONS_INVALID; | ||||
| } | } | ||||
| } else { | } else { | ||||
| @@ -219,14 +215,16 @@ Status OpsKernelManager::ParsePluginOptions(const map<string, string> &options, | |||||
| Status OpsKernelManager::CheckPluginPtr() const { | Status OpsKernelManager::CheckPluginPtr() const { | ||||
| for (auto iter = ops_kernel_store_.begin(); iter != ops_kernel_store_.end(); ++iter) { | for (auto iter = ops_kernel_store_.begin(); iter != ops_kernel_store_.end(); ++iter) { | ||||
| if (iter->second == nullptr) { | if (iter->second == nullptr) { | ||||
| GELOGE(INTERNAL_ERROR, "[Check][PluginPtr] 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) { | for (auto iter1 = graph_optimizers_.begin(); iter1 != graph_optimizers_.end(); ++iter1) { | ||||
| if (iter1->second == nullptr) { | if (iter1->second == nullptr) { | ||||
| GELOGE(INTERNAL_ERROR, "[Check][PluginPtr] 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; | return SUCCESS; | ||||
| @@ -238,8 +236,9 @@ Status OpsKernelManager::InitOpKernelInfoStores(const map<string, string> &optio | |||||
| GELOGI("OpKernelInfoStore name: %s.", (it.first).c_str()); | GELOGI("OpKernelInfoStore name: %s.", (it.first).c_str()); | ||||
| Status ret = it.second->Initialize(options); | Status ret = it.second->Initialize(options); | ||||
| if (ret != SUCCESS) { | if (ret != SUCCESS) { | ||||
| GELOGE(GE_OPS_KERNEL_STORE_INIT_FAILED, "[init][opKernelLib]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; | |||||
| } | } | ||||
| } | } | ||||
| @@ -264,7 +263,7 @@ void OpsKernelManager::InitOpsKernelInfo() { | |||||
| std::shared_ptr<GELib> instance_ptr = ge::GELib::GetInstance(); | std::shared_ptr<GELib> instance_ptr = ge::GELib::GetInstance(); | ||||
| if (instance_ptr == nullptr) { | if (instance_ptr == nullptr) { | ||||
| GELOGE(GE_CLI_GE_NOT_INITIALIZED, "[get][GELib]malloc instance_ptr failed."); | GELOGE(GE_CLI_GE_NOT_INITIALIZED, "[get][GELib]malloc instance_ptr failed."); | ||||
| REPORT_INNER_ERROR("E19999", "GELib::GetInstance failed."); | |||||
| REPORT_CALL_ERROR("E19999", "GELib::GetInstance failed."); | |||||
| return; | return; | ||||
| } | } | ||||
| // sort opinfo of ops_kernel_info_ | // sort opinfo of ops_kernel_info_ | ||||
| @@ -308,8 +307,8 @@ Status OpsKernelManager::InitGraphOptimzers(const map<string, string> &options) | |||||
| GE_CHK_STATUS_RET(it.second->GetAttributes(attrs)) | GE_CHK_STATUS_RET(it.second->GetAttributes(attrs)) | ||||
| std::shared_ptr<GELib> instance_ptr = ge::GELib::GetInstance(); | std::shared_ptr<GELib> instance_ptr = ge::GELib::GetInstance(); | ||||
| if (instance_ptr == nullptr) { | if (instance_ptr == nullptr) { | ||||
| GELOGE(GE_CLI_GE_NOT_INITIALIZED, "[get][GELib]malloc instance_ptr failed."); | |||||
| REPORT_INNER_ERROR("E19999", "GELib::GetInstance failed."); | |||||
| 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; | return GE_CLI_GE_NOT_INITIALIZED; | ||||
| } | } | ||||
| if (!instance_ptr->DNNEngineManagerObj().IsEngineRegistered(attrs.engineName)) { | if (!instance_ptr->DNNEngineManagerObj().IsEngineRegistered(attrs.engineName)) { | ||||
| @@ -318,8 +317,8 @@ Status OpsKernelManager::InitGraphOptimzers(const map<string, string> &options) | |||||
| } | } | ||||
| Status ret = it.second->Initialize(options); | Status ret = it.second->Initialize(options); | ||||
| if (ret != SUCCESS) { | if (ret != SUCCESS) { | ||||
| GELOGE(GE_OPS_GRAPH_OPTIMIZER_INIT_FAILED, "[init][GraphOptimzer]GraphOptimzer: %s initialize failed.", (it.first).c_str()); | |||||
| REPORT_INNER_ERROR("E19999", "InitGraphOptimzers failed. %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; | return GE_OPS_GRAPH_OPTIMIZER_INIT_FAILED; | ||||
| } | } | ||||
| } | } | ||||
| @@ -336,8 +335,8 @@ Status OpsKernelManager::Finalize() { | |||||
| GELOGI("OpsKernelStore finalize, name: %s.", (iter->first).c_str()); | GELOGI("OpsKernelStore finalize, name: %s.", (iter->first).c_str()); | ||||
| Status status = iter->second->Finalize(); | Status status = iter->second->Finalize(); | ||||
| if (SUCCESS != status) { | if (SUCCESS != status) { | ||||
| GELOGE(status, "[check][status]OpsKernelStore finalize failed, name: %s.", (iter->first).c_str()); | |||||
| REPORT_INNER_ERROR("E19999", "OpsKernelStore finalize failed, name: %s.", (iter->first).c_str()); | |||||
| GELOGE(status, "[Check][Status]OpsKernelStore finalize failed, name: %s.", (iter->first).c_str()); | |||||
| REPORT_CALL_ERROR("E19999", "OpsKernelStore finalize failed, name: %s.", (iter->first).c_str()); | |||||
| return status; | return status; | ||||
| } | } | ||||
| } | } | ||||
| @@ -345,15 +344,15 @@ Status OpsKernelManager::Finalize() { | |||||
| GELOGI("GraphOptimzers finalize, name: %s.", (iter->first).c_str()); | GELOGI("GraphOptimzers finalize, name: %s.", (iter->first).c_str()); | ||||
| Status status = iter->second->Finalize(); | Status status = iter->second->Finalize(); | ||||
| if (status != SUCCESS) { | if (status != SUCCESS) { | ||||
| GELOGE(status, "[check][status]GraphOptimzers finalize failed, name: %s.", (iter->first).c_str()); | |||||
| REPORT_INNER_ERROR("E19999", "GraphOptimzers finalize failed, name: %s.", (iter->first).c_str()); | |||||
| GELOGE(status, "[Check][Status]GraphOptimzers finalize failed, name: %s.", (iter->first).c_str()); | |||||
| REPORT_CALL_ERROR("E19999", "GraphOptimzers finalize failed, name: %s.", (iter->first).c_str()); | |||||
| return status; | return status; | ||||
| } | } | ||||
| } | } | ||||
| Status ret = FinalizeOpsKernel(); | Status ret = FinalizeOpsKernel(); | ||||
| if (ret != SUCCESS) { | if (ret != SUCCESS) { | ||||
| GELOGE(ret, "free ops kernel resource failed."); | |||||
| GELOGE(ret, "[Free][Ops kernel resource] failed."); | |||||
| return ret; | return ret; | ||||
| } | } | ||||
| @@ -464,8 +463,9 @@ Status OpsKernelManager::FinalizeOpsKernel() { | |||||
| GELOGI("ge invoke ops kernal finalize."); | GELOGI("ge invoke ops kernal finalize."); | ||||
| Status ret = plugin_manager_.InvokeAll<Status>(kFinalize); | Status ret = plugin_manager_.InvokeAll<Status>(kFinalize); | ||||
| if (ret != SUCCESS) { | if (ret != SUCCESS) { | ||||
| GELOGE(ret, "[Finalize][check][status] invoke Fe finalize failed."); | |||||
| return ret; | |||||
| GELOGE(ret, "[Finalize][Check][Status] invoke Fe finalize failed."); | |||||
| REPORT_CALL_ERROR("E19999", "PluginManager InvokeAll failed."); | |||||
| return ret; | |||||
| } | } | ||||
| return SUCCESS; | return SUCCESS; | ||||