@@ -72,7 +72,8 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelSaver::SaveJsonToFi | |||||
ErrorManager::GetInstance().ATCReportErrMessage( | ErrorManager::GetInstance().ATCReportErrMessage( | ||||
"E19004", {"file", "errmsg"}, {file_path, strerror(errno)}); | "E19004", {"file", "errmsg"}, {file_path, strerror(errno)}); | ||||
// Need to both print the error info of mmWrite and mmClose, so return ret after mmClose | // Need to both print the error info of mmWrite and mmClose, so return ret after mmClose | ||||
GELOGE(FAILED, "[Write][Data]To file %s failed. errno %ld, errmsg %s", file_path, mmpa_ret, strerror(errno)); | |||||
GELOGE(FAILED, "[Write][Data]To file %s failed. errno %ld, errmsg %s", | |||||
file_path, mmpa_ret, strerror(errno)); | |||||
ret = FAILED; | ret = FAILED; | ||||
} | } | ||||
// Close file | // Close file | ||||
@@ -106,7 +106,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ge::Status ProfilingManager::In | |||||
static_cast<uint32_t>(MsprofCtrlCallbackType::MSPROF_CTRL_INIT_GE_OPTIONS), cb_ret); | static_cast<uint32_t>(MsprofCtrlCallbackType::MSPROF_CTRL_INIT_GE_OPTIONS), cb_ret); | ||||
REPORT_CALL_ERROR("E19999", "Call msprofCtrlCallback failed, type %u, return %d", | REPORT_CALL_ERROR("E19999", "Call msprofCtrlCallback failed, type %u, return %d", | ||||
static_cast<uint32_t>(MsprofCtrlCallbackType::MSPROF_CTRL_INIT_GE_OPTIONS), | static_cast<uint32_t>(MsprofCtrlCallbackType::MSPROF_CTRL_INIT_GE_OPTIONS), | ||||
cb_ret); | |||||
cb_ret); | |||||
return FAILED; | return FAILED; | ||||
} | } | ||||
GELOGI("Profiling init success"); | GELOGI("Profiling init success"); | ||||
@@ -204,7 +204,7 @@ ge::Status ProfilingManager::ParseOptions(const std::string &options) { | |||||
is_training_trace_ = true; | is_training_trace_ = true; | ||||
} catch (...) { | } catch (...) { | ||||
GELOGE(FAILED, "[Check][Param]Json prof_conf options is invalid"); | GELOGE(FAILED, "[Check][Param]Json prof_conf options is invalid"); | ||||
REPORT_INNER_ERROR("E19999", "Json prof_conf options is invalid"); | |||||
REPORT_INNER_ERROR("E19999", "Json prof_conf options is invalid"); | |||||
return ge::PARAM_INVALID; | return ge::PARAM_INVALID; | ||||
} | } | ||||
return ge::SUCCESS; | return ge::SUCCESS; | ||||
@@ -234,7 +234,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY void ProfilingManager::StopProf | |||||
// stop profiling | // stop profiling | ||||
if (prof_cb_.msprofCtrlCallback == nullptr) { | if (prof_cb_.msprofCtrlCallback == nullptr) { | ||||
GELOGE(ge::PARAM_INVALID, "[Check][Param]MsprofCtrlCallback callback is nullptr"); | GELOGE(ge::PARAM_INVALID, "[Check][Param]MsprofCtrlCallback callback is nullptr"); | ||||
REPORT_INNER_ERROR("E19999", "MsprofCtrlCallback callback is nullptr"); | |||||
REPORT_INNER_ERROR("E19999", "MsprofCtrlCallback callback is nullptr"); | |||||
return; | return; | ||||
} | } | ||||
int32_t cb_ret = prof_cb_.msprofCtrlCallback(static_cast<uint32_t>(MsprofCtrlCallbackType::MSPROF_CTRL_FINALIZE), | int32_t cb_ret = prof_cb_.msprofCtrlCallback(static_cast<uint32_t>(MsprofCtrlCallbackType::MSPROF_CTRL_FINALIZE), | ||||
@@ -299,7 +299,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY void ProfilingManager::Profilin | |||||
GELOGE(FAILED, "[Convert][ReportData]Failed to convert json to string, reason %s.", | GELOGE(FAILED, "[Convert][ReportData]Failed to convert json to string, reason %s.", | ||||
e.what()); | e.what()); | ||||
REPORT_CALL_ERROR("E19999", "Failed to convert reported_data from json to string, reason %s", | REPORT_CALL_ERROR("E19999", "Failed to convert reported_data from json to string, reason %s", | ||||
e.what()); | |||||
e.what()); | |||||
return ; | return ; | ||||
} catch (...) { | } catch (...) { | ||||
GELOGE(FAILED, "[Convert][ReportedData]Failed to convert JSON to string"); | GELOGE(FAILED, "[Convert][ReportedData]Failed to convert JSON to string"); | ||||
@@ -497,7 +497,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ProfilingManager::ProfMo | |||||
rtError_t rt_ret = rtProfilerStart(module, device_num, device); | rtError_t rt_ret = rtProfilerStart(module, device_num, device); | ||||
if (rt_ret != RT_ERROR_NONE) { | if (rt_ret != RT_ERROR_NONE) { | ||||
GELOGE(FAILED, "[Start][Profiler]Malloc buffer failed, ret 0x%X", rt_ret); | GELOGE(FAILED, "[Start][Profiler]Malloc buffer failed, ret 0x%X", rt_ret); | ||||
REPORT_CALL_ERROR("E19999", "Malloc buffer failed when start profiling, ret 0x%X", rt_ret); | |||||
REPORT_CALL_ERROR("E19999", "Malloc buffer failed when start profiling, ret 0x%X", rt_ret); | |||||
return FAILED; | return FAILED; | ||||
} | } | ||||
UpdateSubscribeDeviceModuleMap(kProfModelSubscribe, device[0], module); | UpdateSubscribeDeviceModuleMap(kProfModelSubscribe, device[0], module); | ||||
@@ -533,7 +533,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ProfilingManager::ProfMo | |||||
rtError_t rt_ret = rtProfilerStop(subs_dev_module_[device[0]].module, dev_num, device); | rtError_t rt_ret = rtProfilerStop(subs_dev_module_[device[0]].module, dev_num, device); | ||||
if (rt_ret != RT_ERROR_NONE) { | if (rt_ret != RT_ERROR_NONE) { | ||||
GELOGE(FAILED, "[Stop][Profiler]Malloc buffer Failed, ret %d", rt_ret); | GELOGE(FAILED, "[Stop][Profiler]Malloc buffer Failed, ret %d", rt_ret); | ||||
REPORT_CALL_ERROR("E19999", "Malloc buffer failed when stop profiling, ret %d", rt_ret); | |||||
REPORT_CALL_ERROR("E19999", "Malloc buffer failed when stop profiling, ret %d", rt_ret); | |||||
return FAILED; | return FAILED; | ||||
} | } | ||||
} | } | ||||
@@ -749,7 +749,8 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ProfilingManager::ProfSt | |||||
auto device_id_ptr = std::unique_ptr<uint32_t[]>(new (std::nothrow) uint32_t[device_num]); | auto device_id_ptr = std::unique_ptr<uint32_t[]>(new (std::nothrow) uint32_t[device_num]); | ||||
if (device_id_ptr == nullptr) { | if (device_id_ptr == nullptr) { | ||||
GELOGE(FAILED, "[Start][Profiling]Malloc buffer failed when start profiling, device num %d", device_num); | |||||
GELOGE(FAILED, "[Start][Profiling]Malloc buffer failed when start profiling, device num %d", | |||||
device_num); | |||||
REPORT_CALL_ERROR("E19999", "Malloc buffer failed when start profiling, device num %d", | REPORT_CALL_ERROR("E19999", "Malloc buffer failed when start profiling, device num %d", | ||||
device_num); | device_num); | ||||
return FAILED; | return FAILED; | ||||
@@ -799,7 +800,8 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ProfilingManager::ProfSt | |||||
} | } | ||||
auto device_id_ptr = std::unique_ptr<uint32_t[]>(new (std::nothrow) uint32_t[device_num]); | auto device_id_ptr = std::unique_ptr<uint32_t[]>(new (std::nothrow) uint32_t[device_num]); | ||||
if (device_id_ptr == nullptr) { | if (device_id_ptr == nullptr) { | ||||
GELOGE(FAILED, "[Stop][Profiling]Malloc buffer failed when stop profiling, device num %d", device_num); | |||||
GELOGE(FAILED, "[Stop][Profiling]Malloc buffer failed when stop profiling, device num %d", | |||||
device_num); | |||||
REPORT_CALL_ERROR("E19999", "Malloc buffer failed when stop profiling, device num %d", | REPORT_CALL_ERROR("E19999", "Malloc buffer failed when stop profiling, device num %d", | ||||
device_num); | device_num); | ||||
return FAILED; | return FAILED; | ||||
@@ -288,8 +288,8 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY bool ReadProtoFromText(const ch | |||||
google::protobuf::io::IstreamInputStream input(&fs); | google::protobuf::io::IstreamInputStream input(&fs); | ||||
bool ret = google::protobuf::TextFormat::Parse(&input, message); | bool ret = google::protobuf::TextFormat::Parse(&input, message); | ||||
GE_IF_BOOL_EXEC(!ret, ErrorManager::GetInstance().ATCReportErrMessage("E19018", {"protofile"}, {file}); | GE_IF_BOOL_EXEC(!ret, ErrorManager::GetInstance().ATCReportErrMessage("E19018", {"protofile"}, {file}); | ||||
GELOGE(ret, "[Parse][File]Through [google::protobuf::TextFormat::Parse] failed, file %s", | |||||
file)); | |||||
GELOGE(ret, "[Parse][File]Through [google::protobuf::TextFormat::Parse] failed, " | |||||
"file %s", file)); | |||||
fs.close(); | fs.close(); | ||||
return ret; | return ret; | ||||
@@ -554,8 +554,8 @@ FMK_FUNC_HOST_VISIBILITY bool IsValidFile(const char *file_path) { | |||||
return false; | return false; | ||||
} | } | ||||
if (stat.st_size > kMaxConfigFileByte) { | if (stat.st_size > kMaxConfigFileByte) { | ||||
GELOGE(PARAM_INVALID, "[Check][Param]Config file %s size %ld is larger than max config file Bytes %u", | |||||
resolved_file_path.c_str(), stat.st_size, kMaxConfigFileByte); | |||||
GELOGE(PARAM_INVALID, "[Check][Param]Config file %s size %ld is larger than max config " | |||||
"file Bytes %u", resolved_file_path.c_str(), stat.st_size, kMaxConfigFileByte); | |||||
REPORT_CALL_ERROR("E19999", "Config file %s size %ld is larger than max config file Bytes %u", | REPORT_CALL_ERROR("E19999", "Config file %s size %ld is larger than max config file Bytes %u", | ||||
resolved_file_path.c_str(), stat.st_size, kMaxConfigFileByte); | resolved_file_path.c_str(), stat.st_size, kMaxConfigFileByte); | ||||
return false; | return false; | ||||
@@ -586,7 +586,8 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status CheckPath(const char *pa | |||||
INT32 is_dir = mmIsDir(path); | INT32 is_dir = mmIsDir(path); | ||||
if (is_dir != EN_OK) { | if (is_dir != EN_OK) { | ||||
GELOGE(PATH_INVALID, "[Open][Directory]Failed, directory path %s, errmsg %s", path, strerror(errno)); | |||||
GELOGE(PATH_INVALID, "[Open][Directory]Failed, directory path %s, errmsg %s", | |||||
path, strerror(errno)); | |||||
REPORT_CALL_ERROR("E19999", "Open directory %s failed, errmsg %s", path, strerror(errno)); | REPORT_CALL_ERROR("E19999", "Open directory %s failed, errmsg %s", path, strerror(errno)); | ||||
return PATH_INVALID; | return PATH_INVALID; | ||||
} | } | ||||
@@ -107,8 +107,8 @@ Status DNNEngineManager::Initialize(const std::map<std::string, std::string> &op | |||||
iter->second->GetAttributes(attrs); | iter->second->GetAttributes(attrs); | ||||
if (attrs.runtime_type == RuntimeType::DEVICE) { | if (attrs.runtime_type == RuntimeType::DEVICE) { | ||||
if ((attrs.mem_type.size()) != 1 || (attrs.mem_type[0] != GE_ENGINE_ATTR_MEM_TYPE_HBM)) { | if ((attrs.mem_type.size()) != 1 || (attrs.mem_type[0] != GE_ENGINE_ATTR_MEM_TYPE_HBM)) { | ||||
GELOGE(GE_ENG_MEMTYPE_ERROR, "[Check][Param]Engine %s in aicore, but the memory type is not HBM, " | |||||
"mem_type_size %d", (iter->first).c_str(), attrs.mem_type.size()); | |||||
GELOGE(GE_ENG_MEMTYPE_ERROR, "[Check][Param]Engine %s in aicore, but the memory type is " | |||||
"not HBM, mem_type_size %d", (iter->first).c_str(), attrs.mem_type.size()); | |||||
REPORT_CALL_ERROR("E19999", "Engine %s in aicore, but the memory type is not HBM, " | REPORT_CALL_ERROR("E19999", "Engine %s in aicore, but the memory type is not HBM, " | ||||
"mem_type_size %d", (iter->first).c_str(), attrs.mem_type.size()); | "mem_type_size %d", (iter->first).c_str(), attrs.mem_type.size()); | ||||
return GE_ENG_MEMTYPE_ERROR; | return GE_ENG_MEMTYPE_ERROR; | ||||
@@ -246,7 +246,8 @@ std::string DNNEngineManager::GetDNNEngineName(const ge::NodePtr &node_ptr) { | |||||
{kernel_name, op_desc->GetType(), op_desc->GetName()}); | {kernel_name, op_desc->GetType(), op_desc->GetName()}); | ||||
GELOGE(FAILED, | GELOGE(FAILED, | ||||
"[Check][Param]The custom operator registered by the user does not support " | "[Check][Param]The custom operator registered by the user does not support " | ||||
"the logic function delivered by this network, kernel_name %s, op type %s, op name %s", | |||||
"the logic function delivered by this network, kernel_name %s, op type %s, " | |||||
"op name %s", | |||||
kernel_name.c_str(), op_desc->GetType().c_str(), op_desc->GetName().c_str()); | kernel_name.c_str(), op_desc->GetType().c_str(), op_desc->GetName().c_str()); | ||||
std::string error_info = "The custom operator registered by the user does not support the logic function" | std::string error_info = "The custom operator registered by the user does not support the logic function" | ||||
"delivered by this network"; | "delivered by this network"; | ||||
@@ -273,8 +274,9 @@ std::string DNNEngineManager::GetDNNEngineName(const ge::NodePtr &node_ptr) { | |||||
reason += it.first + ":" + it.second + ";"; | reason += it.first + ":" + it.second + ";"; | ||||
ErrorManager::GetInstance().ATCReportErrMessage( | ErrorManager::GetInstance().ATCReportErrMessage( | ||||
"E13002", {"optype", "opskernel", "reason"}, {op_desc->GetType(), it.first, it.second}); | "E13002", {"optype", "opskernel", "reason"}, {op_desc->GetType(), it.first, it.second}); | ||||
GELOGE(GE_GRAPH_ASSIGN_ENGINE_FAILED, "[Concat][UnsupportedReasons]Op type %s of ops kernel %s is unsupported, " | |||||
"reason %s", op_desc->GetType().c_str(), it.first.c_str(), it.second.c_str()); | |||||
GELOGE(GE_GRAPH_ASSIGN_ENGINE_FAILED, "[Concat][UnsupportedReasons]Op type %s of ops kernel %s " | |||||
"is unsupported, reason %s", | |||||
op_desc->GetType().c_str(), it.first.c_str(), it.second.c_str()); | |||||
} | } | ||||
analyzer::DataInfo analyze_info{root_graph->GetSessionID(), root_graph->GetGraphID(), | analyzer::DataInfo analyze_info{root_graph->GetSessionID(), root_graph->GetGraphID(), | ||||
@@ -284,7 +286,8 @@ std::string DNNEngineManager::GetDNNEngineName(const ge::NodePtr &node_ptr) { | |||||
ErrorManager::GetInstance().ATCReportErrMessage( | ErrorManager::GetInstance().ATCReportErrMessage( | ||||
"E13003", {"opname", "optype"}, {op_desc->GetName(), op_desc->GetType()}); | "E13003", {"opname", "optype"}, {op_desc->GetName(), op_desc->GetType()}); | ||||
GELOGE(GE_GRAPH_ASSIGN_ENGINE_FAILED, "[Get][DNNEngineName]Can't find any supported ops kernel and engine of %s, type is %s", | |||||
GELOGE(GE_GRAPH_ASSIGN_ENGINE_FAILED, "[Get][DNNEngineName]Can't find any supported ops kernel " | |||||
"and engine of %s, type is %s", | |||||
op_desc->GetName().c_str(), op_desc->GetType().c_str()); | op_desc->GetName().c_str(), op_desc->GetType().c_str()); | ||||
return ""; | return ""; | ||||
} | } | ||||
@@ -335,10 +338,10 @@ Status DNNEngineManager::ParserJsonFile() { | |||||
return FAILED; | return FAILED; | ||||
} | } | ||||
if (!scheduler_utils_json.is_array()) { | if (!scheduler_utils_json.is_array()) { | ||||
GELOGE(FAILED, "[Check][Param]The message of kSchedulerUnits is not array and the file path is %s", | |||||
json_file_path.c_str()); | |||||
REPORT_CALL_ERROR("E19999", "The message of kSchedulerUnits is not array and the file path is %s", | |||||
json_file_path.c_str()); | |||||
GELOGE(FAILED, "[Check][Param]The message of kSchedulerUnits is not array and " | |||||
"the file path is %s", json_file_path.c_str()); | |||||
REPORT_CALL_ERROR("E19999", "The message of kSchedulerUnits is not array and " | |||||
"the file path is %s", json_file_path.c_str()); | |||||
return FAILED; | return FAILED; | ||||
} | } | ||||
auto size = scheduler_json_file[kSchedulerUnits].size(); | auto size = scheduler_json_file[kSchedulerUnits].size(); | ||||
@@ -362,7 +365,8 @@ Status DNNEngineManager::ParserJsonFile() { | |||||
status = ParserEngineMessage(engines_json_map, scheduler_id_temp, engine_conf_map); | status = ParserEngineMessage(engines_json_map, scheduler_id_temp, engine_conf_map); | ||||
if (status != SUCCESS) { | if (status != SUCCESS) { | ||||
GELOGE(FAILED, "[Parse][EngineMessage]Failed, scheduler_id_temp %s", scheduler_id_temp); | GELOGE(FAILED, "[Parse][EngineMessage]Failed, scheduler_id_temp %s", scheduler_id_temp); | ||||
REPORT_CALL_ERROR("E19999", "Parse engine message failed, scheduler_id_temp %s", scheduler_id_temp); | |||||
REPORT_CALL_ERROR("E19999", "Parse engine message failed, scheduler_id_temp %s", | |||||
scheduler_id_temp); | |||||
return FAILED; | return FAILED; | ||||
} | } | ||||
scheduler_conf.name = scheduler_utils_json[i][kName]; | scheduler_conf.name = scheduler_utils_json[i][kName]; | ||||
@@ -372,8 +376,8 @@ Status DNNEngineManager::ParserJsonFile() { | |||||
if (it != schedulers_.end()) { | if (it != schedulers_.end()) { | ||||
GELOGE(FAILED, "[Check][Param]There are the same scheduler ts %s in the json file", | GELOGE(FAILED, "[Check][Param]There are the same scheduler ts %s in the json file", | ||||
scheduler_id_temp.c_str()); | scheduler_id_temp.c_str()); | ||||
REPORT_CALL_ERROR("E19999", "[Check][Param]There are the same scheduler ts %s in the json file", | |||||
scheduler_id_temp.c_str()); | |||||
REPORT_CALL_ERROR("E19999", "[Check][Param]There are the same scheduler ts %s " | |||||
"in the json file", scheduler_id_temp.c_str()); | |||||
return FAILED; | return FAILED; | ||||
} | } | ||||
schedulers_.emplace(scheduler_id_temp, scheduler_conf); | schedulers_.emplace(scheduler_id_temp, scheduler_conf); | ||||
@@ -469,8 +473,10 @@ Status DNNEngineManager::ReadJsonFile(const std::string &file_path, JsonHandle h | |||||
const char *file = file_path.data(); | const char *file = file_path.data(); | ||||
if ((mmAccess2(file, M_F_OK)) != EN_OK) { | if ((mmAccess2(file, M_F_OK)) != EN_OK) { | ||||
if (engines_map_.size() != 0) { | if (engines_map_.size() != 0) { | ||||
GELOGE(FAILED, "[Check][Param]The json file %s not exists, err %s", file_path.c_str(), strerror(errno)); | |||||
REPORT_CALL_ERROR("E19999", "Json file %s not exists, err %s", file_path.c_str(), strerror(errno)); | |||||
GELOGE(FAILED, "[Check][Param]The json file %s not exists, err %s", | |||||
file_path.c_str(), strerror(errno)); | |||||
REPORT_CALL_ERROR("E19999", "Json file %s not exists, err %s", | |||||
file_path.c_str(), strerror(errno)); | |||||
return FAILED; | return FAILED; | ||||
} else { | } else { | ||||
GELOGW("The json file %s is not needed.", file_path.c_str()); | GELOGW("The json file %s is not needed.", file_path.c_str()); | ||||