From: @yangyongqiang5033
Reviewed-by: @xchu42,@ji_chen
Signed-off-by: @ji_chen
pull/402/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit e6933805d3

@ -25,7 +25,7 @@ void CustAICPUKernelStore::AddCustAICPUKernel(const CustAICPUKernelPtr &kernel)
}
void CustAICPUKernelStore::LoadCustAICPUKernelBinToOpDesc(const std::shared_ptr<ge::OpDesc> &op_desc) const {
GELOGI("LoadCustAICPUKernelBinToOpDesc in");
GELOGD("LoadCustAICPUKernelBinToOpDesc in");
if (op_desc != nullptr) {
auto kernel_bin = FindKernel(op_desc->GetName());
if (kernel_bin != nullptr) {
@ -34,6 +34,6 @@ void CustAICPUKernelStore::LoadCustAICPUKernelBinToOpDesc(const std::shared_ptr<
GELOGI("Load cust aicpu kernel:%s, %zu", kernel_bin->GetName().c_str(), kernel_bin->GetBinDataSize());
}
}
GELOGI("LoadCustAICPUKernelBinToOpDesc success");
GELOGD("LoadCustAICPUKernelBinToOpDesc success");
}
} // namespace ge

@ -98,7 +98,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::SaveToOmMod
ge::Buffer model_buffer;
(void)model_tmp->Save(model_buffer);
GELOGI("MODEL_DEF size is %zu", model_buffer.GetSize());
GELOGD("MODEL_DEF size is %zu", model_buffer.GetSize());
if (model_buffer.GetSize() > 0) {
if (SaveModelPartition(om_file_save_helper, ModelPartitionType::MODEL_DEF, model_buffer.GetData(),
model_buffer.GetSize()) != SUCCESS) {
@ -107,7 +107,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::SaveToOmMod
}
}
auto ge_model_weight = ge_model->GetWeight();
GELOGI("WEIGHTS_DATA size is %zu, %p", ge_model_weight.GetSize(), ge_model_weight.GetData());
GELOGD("WEIGHTS_DATA size is %zu, %p", ge_model_weight.GetSize(), ge_model_weight.GetData());
// weight is not necessary
if (ge_model_weight.GetSize() > 0) {
GE_CHK_STATUS_RET(SaveModelPartition(om_file_save_helper,
@ -117,7 +117,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::SaveToOmMod
}
TBEKernelStore tbe_kernel_store = ge_model->GetTBEKernelStore();
GELOGI("TBE_KERNELS size is %zu", tbe_kernel_store.DataSize());
GELOGD("TBE_KERNELS size is %zu", tbe_kernel_store.DataSize());
if (tbe_kernel_store.DataSize() > 0) {
GE_CHK_STATUS_RET(SaveModelPartition(om_file_save_helper,
ModelPartitionType::TBE_KERNELS,
@ -129,7 +129,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::SaveToOmMod
(void)tbe_kernel_store.Load(tbe_kernel_store.Data(), tbe_kernel_store.DataSize());
CustAICPUKernelStore cust_aicpu_kernel_store = ge_model->GetCustAICPUKernelStore();
GELOGI("cust aicpu kernels size is %zu", cust_aicpu_kernel_store.DataSize());
GELOGD("cust aicpu kernels size is %zu", cust_aicpu_kernel_store.DataSize());
if (cust_aicpu_kernel_store.DataSize() > 0) {
GE_CHK_STATUS_RET(SaveModelPartition(om_file_save_helper,
ModelPartitionType::CUST_AICPU_KERNELS,
@ -155,8 +155,8 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::SaveToOmMod
}
(void)model_task_def->SerializePartialToArray(task_buffer.GetData(), static_cast<int>(partition_task_size));
GELOGI("TASK_INFO op_size:%d, stream_num:%u", model_task_def->op().size(), model_task_def->stream_num());
GELOGI("TASK_INFO size is %zu", partition_task_size);
GELOGD("TASK_INFO op_size:%d, stream_num:%u", model_task_def->op().size(), model_task_def->stream_num());
GELOGD("TASK_INFO size is %zu", partition_task_size);
if (SaveModelPartition(om_file_save_helper, ModelPartitionType::TASK_INFO, task_buffer.GetData(),
partition_task_size) != SUCCESS) {
@ -168,7 +168,6 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::SaveToOmMod
model_header.platform_type = ge_model->GetPlatformType();
model_header.om_ir_version = ge_model->GetVersion();
std::string platform_version = ge_model->GetPlatformVersion();
GELOGI("Platform version save: %s", platform_version.c_str());
errno_t err;
err = memcpy_s(model_header.platform_version, PLATFORM_VERSION_LEN, platform_version.c_str(),
@ -178,7 +177,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::SaveToOmMod
return MEMALLOC_FAILED;
}
string version = reinterpret_cast<char *>(model_header.platform_version);
GELOGI("Platform version save: %s", version.c_str());
GELOGD("Platform version save: %s", version.c_str());
size_t name_size = ge_model->GetName().size();
name_size = name_size > (MODEL_NAME_LENGTH - 1) ? (MODEL_NAME_LENGTH - 1) : name_size;
@ -188,7 +187,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::SaveToOmMod
return MEMALLOC_FAILED;
}
string model_name = reinterpret_cast<char *>(model_header.name);
GELOGI("Model name save:%s", model_name.c_str());
GELOGD("Model name save:%s", model_name.c_str());
Status ret = om_file_save_helper->SaveModel(save_param, output_file.c_str(), model, is_offline_);
if (ret != SUCCESS) {
@ -346,7 +345,7 @@ Status ModelHelper::LoadModelData(OmFileLoadHelper &om_load_helper) {
ModelPartition partition_model_def;
// no need to check value, DATA->NetOutput
om_load_helper.GetModelPartition(ModelPartitionType::MODEL_DEF, partition_model_def);
GELOGI("Model_def partition addr:%p,size:%u", partition_model_def.data, partition_model_def.size);
GELOGD("Model_def partition addr:%p,size:%u", partition_model_def.data, partition_model_def.size);
ge::Model model;
if (ge::Model::Load(partition_model_def.data, partition_model_def.size, model) != SUCCESS) {
@ -376,7 +375,7 @@ Status ModelHelper::LoadWeights(OmFileLoadHelper &om_load_helper) {
ge::Buffer weight = ge::Buffer::CopyFrom(partition.data, partition.size);
model_->SetWeight(weight);
GELOGI("GetWeight size:%u", partition.size);
GELOGD("GetWeight size:%u", partition.size);
return SUCCESS;
}
@ -393,7 +392,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::LoadTask(Om
GELOGE(INTERNAL_ERROR, "ReadProtoFromArray failed.");
return INTERNAL_ERROR;
}
GELOGI("TASK_INFO op_size:%d, stream_num:%u", task->op().size(), task->stream_num());
GELOGD("TASK_INFO op_size:%d, stream_num:%u", task->op().size(), task->stream_num());
}
model_->SetModelTaskDef(task);
return SUCCESS;
@ -404,9 +403,9 @@ Status ModelHelper::LoadTBEKernelStore(OmFileLoadHelper &om_load_helper) {
ModelPartition partition_kernel_def;
TBEKernelStore kernel_store;
if (om_load_helper.GetModelPartition(ModelPartitionType::TBE_KERNELS, partition_kernel_def) == SUCCESS) {
GELOGI("Kernels partition size:%u", partition_kernel_def.size);
GELOGD("Kernels partition size:%u", partition_kernel_def.size);
if (kernel_store.Load(partition_kernel_def.data, partition_kernel_def.size)) {
GELOGI("Load tbe kernels success");
GELOGD("Load tbe kernels success");
} else {
GELOGW("Load tbe kernels failed");
}
@ -420,11 +419,9 @@ Status ModelHelper::LoadCustAICPUKernelStore(OmFileLoadHelper &om_load_helper) {
ModelPartition partition_kernel_def;
CustAICPUKernelStore kernel_store;
if (om_load_helper.GetModelPartition(ModelPartitionType::CUST_AICPU_KERNELS, partition_kernel_def) == SUCCESS) {
GELOGI("Kernels partition size:%u", partition_kernel_def.size);
GELOGD("Kernels partition size:%u", partition_kernel_def.size);
if (kernel_store.Load(partition_kernel_def.data, partition_kernel_def.size)) {
GELOGI("Load cust aicpu kernels success");
} else {
GELOGW("Load cust aicpu kernels failed");
}
}
model_->SetCustAICPUKernelStore(kernel_store);

@ -123,7 +123,7 @@ Status OmFileLoadHelper::LoadModelPartitionTable(uint8_t *model_data, const uint
return ACL_ERROR_GE_EXEC_MODEL_PARTITION_NUM_INVALID;
}
size_t mem_offset = SIZE_OF_MODEL_PARTITION_TABLE(*partition_table);
GELOGI("ModelPartitionTable num :%u, ModelFileHeader length :%zu, ModelPartitionTable length :%zu",
GELOGD("ModelPartitionTable num :%u, ModelFileHeader length :%zu, ModelPartitionTable length :%zu",
partition_table->num, sizeof(ModelFileHeader), mem_offset);
if (model_data_size <= mem_offset) {
GELOGE(ACL_ERROR_GE_EXEC_MODEL_DATA_SIZE_INVALID, "invalid model data, partition_table->num:%u, model data size %u",
@ -143,7 +143,7 @@ Status OmFileLoadHelper::LoadModelPartitionTable(uint8_t *model_data, const uint
return ACL_ERROR_GE_EXEC_MODEL_DATA_SIZE_INVALID;
}
mem_offset += partition.size;
GELOGI("Partition, type:%d, size:%u", static_cast<int>(partition.type), partition.size);
GELOGD("Partition, type:%d, size:%u", static_cast<int>(partition.type), partition.size);
}
return SUCCESS;
}
@ -167,7 +167,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ModelPartitionTable *OmFileSave
ModelPartition partition = context_.partition_datas_[i];
partition_table->partition[i] = {partition.type, mem_offset, partition.size};
mem_offset += partition.size;
GELOGI("Partition, type:%d, size:%u", static_cast<int>(partition.type), partition.size);
GELOGD("Partition, type:%d, size:%u", static_cast<int>(partition.type), partition.size);
}
return partition_table;
}
@ -191,7 +191,7 @@ Status OmFileSaveHelper::SaveModel(const SaveParam &save_param, const char *outp
(void)save_param.pri_key_file;
Status ret = SaveModelToFile(output_file, model, is_offline);
if (ret == SUCCESS) {
GELOGI("Generate model with encrypt.");
GELOGD("Generate model with encrypt.");
}
return ret;
}
@ -213,7 +213,7 @@ Status OmFileSaveHelper::SaveModelToFile(const char *output_file, ModelBufferDat
FMK_UINT32_ADDCHECK(size_of_table, model_data_len)
model_header_.length = size_of_table + model_data_len;
GELOGI("Sizeof(ModelFileHeader):%zu,sizeof(ModelPartitionTable):%u, model_data_len:%u, model_total_len:%zu",
GELOGD("Sizeof(ModelFileHeader):%zu,sizeof(ModelPartitionTable):%u, model_data_len:%u, model_total_len:%zu",
sizeof(ModelFileHeader), size_of_table, model_data_len, model_header_.length + sizeof(ModelFileHeader));
std::vector<ModelPartition> partition_datas = context_.partition_datas_;
@ -224,7 +224,7 @@ Status OmFileSaveHelper::SaveModelToFile(const char *output_file, ModelBufferDat
ret = FileSaver::SaveToBuffWithFileHeader(model_header_, *partition_table, partition_datas, model);
}
if (ret == SUCCESS) {
GELOGI("Save model success without encrypt.");
GELOGD("Save model success without encrypt.");
}
return ret;
#else

@ -51,7 +51,7 @@ bool KernelStore::Build() {
kernel_head.name_len = static_cast<uint32_t>(kernel->GetName().length());
kernel_head.bin_len = static_cast<uint32_t>(kernel->GetBinDataSize());
GELOGI("get kernel bin name %s, addr %p, size %u",
GELOGD("get kernel bin name %s, addr %p, size %u",
kernel->GetName().c_str(), kernel->GetBinData(), kernel->GetBinDataSize());
mem_ret = memcpy_s(next_buffer, remain_len, &kernel_head, sizeof(kernel_head));
GE_CHK_BOOL_EXEC_NOLOG(mem_ret == EOK, return false);
@ -95,7 +95,7 @@ bool KernelStore::Load(const uint8_t *data, const size_t &len) {
std::string name(next_buffer, kernel_head->name_len);
next_buffer += kernel_head->name_len;
GELOGI("Load kernel from om:%s,%u,%u", name.c_str(), kernel_head->name_len, kernel_head->bin_len);
GELOGD("Load kernel from om:%s,%u,%u", name.c_str(), kernel_head->name_len, kernel_head->bin_len);
std::vector<char> kernel_bin(next_buffer, next_buffer + kernel_head->bin_len);
KernelBinPtr teb_kernel_ptr = ge::MakeShared<KernelBin>(name, std::move(kernel_bin));
if (teb_kernel_ptr != nullptr) {

@ -106,7 +106,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelParserBase::ParseMo
model_data = data;
model_len = file_header->length;
GELOGI("Model_len is %u, model_file_head_len is %zu.", model_len, sizeof(ModelFileHeader));
GELOGD("Model_len is %u, model_file_head_len is %zu.", model_len, sizeof(ModelFileHeader));
} else {
GELOGE(ACL_ERROR_GE_EXEC_MODEL_NOT_SUPPORT_ENCRYPTION, "Invalid model. ModelEncryptType not supported.");
res = ACL_ERROR_GE_EXEC_MODEL_NOT_SUPPORT_ENCRYPTION;

@ -558,7 +558,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY void ProfilingManager::ReportPr
GELOGE(rt_ret, "runtime get logic_device_id failed, current logic_device_id:%d", logic_device_id);
return;
}
GELOGI("current logic_device_id:%d", logic_device_id);
GELOGD("current logic_device_id:%d", logic_device_id);
if (check_device) {
auto ret = std::find(device_id_.begin(), device_id_.end(), logic_device_id);
if (ret == device_id_.end()) {
@ -566,11 +566,11 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY void ProfilingManager::ReportPr
return;
}
}
GELOGI("start ProfilingTaskDescInfo.");
GELOGD("start ProfilingTaskDescInfo.");
ProfilingTaskDescInfo(model_id, task_desc_info, logic_device_id);
GELOGI("start ProfilingGraphDescInfo.");
GELOGD("start ProfilingGraphDescInfo.");
ProfilingGraphDescInfo(model_id, compute_graph_desc_info, logic_device_id);
GELOGI("Report profiling data for GE end.");
GELOGD("Report profiling data for GE end.");
#endif
}
@ -859,7 +859,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ProfilingManager::ProfSt
for (int32_t i = 0; i < device_num; i++) {
device_id_ptr[i] = static_cast<uint32_t>(device_list[i]);
}
GELOGI("Runtime config param: 0x%llx, device num: %d.", module, device_num);
GELOGD("Runtime config param: 0x%llx, device num: %d.", module, device_num);
rtError_t rt_ret = rtProfilerStart(module, device_num, device_id_ptr.get());
if (rt_ret != RT_ERROR_NONE) {
@ -878,7 +878,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ProfilingManager::ProfSt
GELOGW("Prof start: load model module is invalid.");
}
UpdateDeviceIdModuleMap(kProfStart, module, device_list);
GELOGI("Prof start profiling success.");
GELOGD("Prof start profiling success.");
#endif
return SUCCESS;
}
@ -901,7 +901,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ProfilingManager::ProfSt
for (int32_t i = 0; i < device_num; i++) {
device_id_ptr[i] = static_cast<uint32_t>(device_list[i]);
}
GELOGI("Prof stop: runtime config param: 0x%llx, device num: %d", module, device_num);
GELOGD("Prof stop: runtime config param: 0x%llx, device num: %d", module, device_num);
rtError_t rt_ret = rtProfilerStop(module, device_num, device_id_ptr.get());
if (rt_ret != RT_ERROR_NONE) {
GELOGE(FAILED, "Prof stop: runtime profiler config proc failed.");
@ -921,7 +921,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ProfilingManager::ProfSt
GELOGW("Prof stop: load model module is invalid.");
}
UpdateDeviceIdModuleMap(kProfStop, module, device_list);
GELOGI("Prof stop profiling success.");
GELOGD("Prof stop profiling success.");
#endif
return SUCCESS;
}
@ -963,14 +963,14 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY bool ProfilingManager::Profilin
if (rt_ret != RT_ERROR_NONE) {
GELOGE(rt_ret, "Runtime get logic_device_id failed, current logic_device_id:%d", logic_device_id);
}
GELOGI("Current logic_device_id:%d", logic_device_id);
GELOGD("Current logic_device_id:%d", logic_device_id);
bool execute_model_prof_on = false;
auto iter = std::find(device_id_.begin(), device_id_.end(), logic_device_id);
if (iter != device_id_.end()) {
execute_model_prof_on = true;
}
GELOGI("Flag is_execute_profiling: %d, execute_model_prof_on: %d", is_execute_profiling_, execute_model_prof_on);
GELOGD("Flag is_execute_profiling: %d, execute_model_prof_on: %d", is_execute_profiling_, execute_model_prof_on);
return is_execute_profiling_ || execute_model_prof_on;
}

@ -588,7 +588,7 @@ Status GeExecutor::LoadModel(uint32_t &model_id, const ModelData &model_data,
}
Status GeExecutor::UnloadModel(uint32_t model_id) {
GELOGI("unload model %u begin.", model_id);
GELOGD("unload model %u begin.", model_id);
if (!isInit_) {
GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "GeExecutor has not been initialized!");
return ACL_ERROR_GE_EXEC_NOT_INIT;
@ -630,7 +630,6 @@ Status GeExecutor::RunModel(const ge::RunModelData &input_data, ge::RunModelData
// Get input and output descriptor
Status GeExecutor::GetModelDescInfo(uint32_t model_id, std::vector<ge::TensorDesc> &input_desc,
std::vector<ge::TensorDesc> &output_desc, bool new_model_desc) {
GELOGI("get model desc info begin.");
if (!isInit_) {
GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "GeExecutor has not been initialized!");
return ACL_ERROR_GE_EXEC_NOT_INIT;
@ -665,7 +664,6 @@ Status GeExecutor::GetModelDescInfo(uint32_t model_id, std::vector<ge::TensorDes
GetGeTensorDescFromDomiInfo(input_desc, input_desc_infos, input_formats);
GetGeTensorDescFromDomiInfo(output_desc, output_desc_infos, output_formats);
GELOGI("get model desc info end.");
return ge::SUCCESS;
}
@ -679,7 +677,6 @@ Status GeExecutor::GetModelDescInfo(uint32_t model_id, std::vector<ge::TensorDes
///
Status GeExecutor::GetDynamicBatchInfo(uint32_t model_id, std::vector<std::vector<int64_t>> &batch_info,
int32_t &dynamic_type) {
GELOGI("Begin to get dynamic batch info.");
if (!isInit_) {
GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "GeExecutor has not been initialized!");
return ACL_ERROR_GE_EXEC_NOT_INIT;
@ -690,8 +687,6 @@ Status GeExecutor::GetDynamicBatchInfo(uint32_t model_id, std::vector<std::vecto
GELOGE(ret, "GetDynamicBatchInfo failed.");
return ret;
}
GELOGI("Get dynamic batch info succ.");
return SUCCESS;
}
@ -727,7 +722,6 @@ Status GeExecutor::GetCombinedDynamicDims(uint32_t model_id, vector<vector<int64
/// @return execute result
///
Status GeExecutor::GetUserDesignateShapeOrder(uint32_t model_id, vector<string> &user_designate_shape_order) {
GELOGI("Begin to get user designate shape info.");
if (!isInit_) {
GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "GeExecutor has not been initialized!");
return ACL_ERROR_GE_EXEC_NOT_INIT;
@ -739,7 +733,6 @@ Status GeExecutor::GetUserDesignateShapeOrder(uint32_t model_id, vector<string>
return ret;
}
GELOGI("Get user designate shape order succ.");
return SUCCESS;
}
@ -782,7 +775,6 @@ Status GeExecutor::GetAippType(uint32_t model_id, uint32_t index, InputAippType
}
Status GeExecutor::GetModelAttr(uint32_t model_id, std::vector<std::string> &dynamic_output_shape_info) {
GELOGI("Begin to get dynamic batch output shape info");
if (!isInit_) {
GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "not inited yet!");
return ACL_ERROR_GE_EXEC_NOT_INIT;
@ -792,8 +784,6 @@ Status GeExecutor::GetModelAttr(uint32_t model_id, std::vector<std::string> &dyn
GELOGE(ret, "Get dynamic batch output shape info failed.");
return ret;
}
GELOGI("Get dynamic batch output shape info succ.");
return SUCCESS;
}
@ -835,8 +825,6 @@ Status GeExecutor::GetModelDescInfoForZeroCopy(uint32_t model_id, std::vector<ge
}
Status GeExecutor::CommandHandle(const Command &command) {
GELOGI("command handle begin.");
Status ret = GraphLoader::CommandHandle(command);
if (ret != SUCCESS) {
GELOGE(ACL_ERROR_GE_COMMAND_HANDLE, "CommandHandle: Command Handle failed.");
@ -904,7 +892,6 @@ Status GeExecutor::LoadDataFromFile(const std::string &path, ModelData &model_da
*/
Status GeExecutor::LoadModelFromData(uint32_t &model_id, const ModelData &model_data, void *dev_ptr, size_t mem_size,
void *weight_ptr, size_t weight_size) {
GELOGI("Load model from data begin.");
if (!isInit_) {
GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "not inited yet!");
return ACL_ERROR_GE_EXEC_NOT_INIT;
@ -945,7 +932,6 @@ Status GeExecutor::LoadModelWithQ(uint32_t &model_id, const ModelData &model_dat
*/
Status GeExecutor::ExecModel(uint32_t model_id, void *stream, const ge::RunModelData &run_input_data,
ge::RunModelData &run_output_data, bool async_mode) {
GELOGI("Execute model begin.");
if (!isInit_) {
GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "GeExecutor has not been initialized!");
return ACL_ERROR_GE_EXEC_NOT_INIT;

@ -111,7 +111,7 @@ Status GeLocalOpsKernelBuilder::CalcOpRunningParam(Node &ge_node) {
TypeUtils::DataTypeToSerialString(data_type).c_str(), output_mem_size);
return FAILED;
}
GELOGI(
GELOGD(
"Calc op[%s:%s] out[%zu] mem size is %ld,"
" format=%s, data_type=%s.",
node_name.c_str(), node_type.c_str(), i, output_mem_size, TypeUtils::FormatToSerialString(format).c_str(),
@ -174,7 +174,7 @@ Status GeLocalOpsKernelBuilder::GenerateTask(const Node &node, RunContext &conte
GELOGE(ret, "Node:%s(%s) op run failed.", name.c_str(), type.c_str());
return ret;
}
GELOGI("Ge local generate task for node:%s(%s) end, tasks.size()=%zu.", name.c_str(), type.c_str(), tasks.size());
GELOGD("Ge local generate task for node:%s(%s) end, tasks.size()=%zu.", name.c_str(), type.c_str(), tasks.size());
return ret;
}
} // namespace ge_local

@ -24,7 +24,7 @@ namespace ge_local {
NoOp::NoOp(const Node &node, RunContext &run_context) : Op(node, run_context) {}
Status NoOp::Run() {
GELOGI("Node:%s type is %s, no need generate task.", name_.c_str(), type_.c_str());
GELOGD("Node:%s type is %s, no need generate task.", name_.c_str(), type_.c_str());
// Do nothing
return SUCCESS;
}

@ -200,7 +200,6 @@ static Status AddOutputs(const ComputeGraphPtr &graph, const NodePtr &node, cons
}
static void GetOpsProtoPath(string &opsproto_path) {
GELOGI("Start to get ops proto path schedule.");
const char *path_env = std::getenv("ASCEND_OPP_PATH");
if (path_env != nullptr) {
string path = path_env;
@ -383,7 +382,6 @@ bool GeGenerator::Impl::ParseVersion(const std::string &line, std::string &versi
}
version = temp.substr(pos + flag.size());
GELOGI("Version=%s", version.c_str());
return true;
}
@ -425,7 +423,6 @@ bool GeGenerator::Impl::SetAtcVersionInfo(AttrHolder &obj) {
path_base = path_base.substr(0, path_base.rfind('/') + 1);
std::string version_path = path_base + "version.info";
GELOGI("version_path is %s", version_path.c_str());
std::string version;
if (!GetVersionFromPath(version_path, version)) {
GELOGW("Get atc version information failed!");
@ -436,7 +433,6 @@ bool GeGenerator::Impl::SetAtcVersionInfo(AttrHolder &obj) {
GELOGW("Ge model set atc version failed!");
return false;
}
GELOGI("Ge model set atc version information success.");
return true;
}
@ -449,7 +445,6 @@ bool GeGenerator::Impl::SetOppVersionInfo(AttrHolder &obj) {
}
std::string version_path = path_env;
version_path += "/version.info";
GELOGI("version_path is %s", version_path.c_str());
std::string version;
if (!GetVersionFromPath(version_path, version)) {
GELOGW("Get opp version information failed!");
@ -460,7 +455,6 @@ bool GeGenerator::Impl::SetOppVersionInfo(AttrHolder &obj) {
GELOGW("Ge model set opp version failed!");
return false;
}
GELOGI("Ge Model set opp version information success.");
return true;
}
@ -469,7 +463,7 @@ Status GeGenerator::GenerateModel(const Graph &graph, const string &file_name_pr
rtContext_t ctx = nullptr;
auto rt = rtCtxGetCurrent(&ctx);
if (rt != RT_ERROR_NONE) {
GELOGW("Current ctx is null.");
GELOGD("Current ctx is null.");
ctx = nullptr;
}
@ -524,7 +518,6 @@ Status GeGenerator::GenerateModel(const Graph &graph, const string &file_name_pr
(void)rtCtxSetCurrent(ctx);
}
GELOGI("GenerateOfflineModel success.");
return SUCCESS;
}
@ -713,7 +706,6 @@ Status GeGenerator::Impl::BuildModel(const Graph &graph, const vector<GeTensor>
return GE_GENERATOR_GRAPH_MANAGER_ADD_GRAPH_FAILED;
}
GELOGI("Model inputs size is %zu", inputs.size());
graph_manager_.SetOptionsRunGraphFlag(false);
static std::atomic<uint64_t> atomic_session_id(0);

@ -102,7 +102,6 @@ void GraphBuilder::SetOptions(const ge::GraphManagerOptions &options) {
}
Status GraphBuilder::CalcOpParam(const ge::ComputeGraphPtr &graph) {
GELOGI("Begin to calculate op running param.");
GE_CHECK_NOTNULL(graph);
auto instance_ptr = ge::GELib::GetInstance();
if (instance_ptr == nullptr || !instance_ptr->InitFlag()) {
@ -140,7 +139,6 @@ Status GraphBuilder::CalcOpParam(const ge::ComputeGraphPtr &graph) {
auto parent_node = graph->GetParentNode();
if (parent_node == nullptr) {
GELOGI("Graph[%s] do not have parent node, no need update parent node output size.", graph->GetName().c_str());
return SUCCESS;
}
@ -189,7 +187,6 @@ Status GraphBuilder::UpdateParentNodeOutputSize(const ge::ComputeGraphPtr &graph
Status GraphBuilder::Build(ComputeGraphPtr &comp_graph, std::vector<SubGraphInfoPtr> &subgraph_ptr_list,
GeRootModelPtr &ge_root_model_ptr, uint64_t session_id) {
GELOGI("Start to build model.");
if (comp_graph == nullptr) {
GELOGE(GE_GRAPH_PARAM_NULLPTR, "Graph build comp_graph is null.");
return GE_GRAPH_PARAM_NULLPTR;
@ -267,7 +264,7 @@ Status GraphBuilder::BuildForKnownShapeGraph(ComputeGraphPtr &comp_graph, std::v
}
GE_CHK_STATUS_RET(builder.SaveDataToModel(*model_ptr, *ge_model_ptr),
"Graph[%s] builder SaveDataToModel() return fail.", comp_graph->GetName().c_str());
GELOGI("Success to build graph[%s] model.", comp_graph->GetName().c_str());
GELOGD("Success to build graph[%s] model.", comp_graph->GetName().c_str());
GE_TIMESTAMP_END(BuildSubgraph, "GraphBuilder::Build");
return SUCCESS;
}
@ -306,7 +303,7 @@ Status GraphBuilder::BuildForUnknownShapeGraph(ComputeGraphPtr &comp_graph, GeMo
}
GE_CHK_STATUS_RET(builder.SaveDataToModel(*model_ptr, *ge_model_ptr),
"Graph[%s] builder SaveDataToModel() return fail.", comp_graph->GetName().c_str());
GELOGI("Success to build graph[%s] model.", comp_graph->GetName().c_str());
GELOGD("Success to build graph[%s] model.", comp_graph->GetName().c_str());
return SUCCESS;
}
@ -542,7 +539,6 @@ Status GraphBuilder::CalcDynShapeRootGraphDataSize(const ge::OpDescPtr &op_desc)
}
Status GraphBuilder::SecondPartition(ge::ComputeGraphPtr &comp_graph, vector<ge::SubGraphInfoPtr> &subgraph_ptr_list) {
GELOGI("[SecondPartition] second partition.");
GE_TIMESTAMP_START(GraphPartition2);
auto ret = graph_partitioner_.Partition(comp_graph, GraphPartitioner::kSecondPartitioning);
if (ret != SUCCESS) {

@ -33,7 +33,7 @@ Status LabelAllocator::AssignFunctionalLabels() {
}
// Add label task for sub graph.
GELOGI("AssignFunctionalLabels start: %s.", compute_graph_->GetName().c_str());
GELOGD("AssignFunctionalLabels start: %s.", compute_graph_->GetName().c_str());
std::set<NodePtr> functional_nodes;
for (auto graph : compute_graph_->GetAllSubgraphs()) {
if (!CollectFunctionalNode(graph, functional_nodes)) {

@ -597,10 +597,10 @@ Status LogicalStreamAllocator::DoAssign(const ComputeGraphPtr &graph, const Grap
return status;
}
GELOGI("Subgraphs of graph %s:", graph->GetName().c_str());
GELOGD("Subgraphs of graph %s:", graph->GetName().c_str());
for (const auto &subgraph : subgraphs) {
if (subgraph != nullptr) {
GELOGI("subgraph: %s", subgraph->name.c_str());
GELOGD("subgraph: %s", subgraph->name.c_str());
}
}
@ -664,9 +664,9 @@ Status LogicalStreamAllocator::RunPasses(const ComputeGraphPtr &graph, const vec
Status status = pass->Run(graph, subgraphs, context_);
if (status == SUCCESS) {
GELOGI("Stream pass %s return SUCCESS.", pass->GetName().c_str());
GELOGD("Stream pass %s return SUCCESS.", pass->GetName().c_str());
} else if (status == NOT_CHANGED) {
GELOGI("Stream pass %s return NOT_CHANGED.", pass->GetName().c_str());
GELOGD("Stream pass %s return NOT_CHANGED.", pass->GetName().c_str());
} else {
GELOGE(status, "Stream pass %s failed.", pass->GetName().c_str());
return status;

@ -76,7 +76,7 @@ Status BinaryBlockMemAssigner::GetMemoryRanges(vector<int64_t> &range_ceils) {
auto range_number = static_cast<size_t>(
ceil(log(all_memory_size.back() / static_cast<double>(all_memory_size.front())) / log(kLogBase)));
range_number = (range_number == 0) ? 1 : range_number;
GELOGI("Range number: %zu", range_number);
GELOGD("Range number: %zu", range_number);
vector<vector<int64_t>> ranges(range_number);
GE_CHK_BOOL_EXEC((range_number != 0), return PARAM_INVALID, "range_number can't be 0.");
@ -114,7 +114,7 @@ Status BinaryBlockMemAssigner::GetMemoryRanges(vector<int64_t> &range_ceils) {
range_ceils.push_back(range.back());
}
}
GELOGI("Range ceils: %s", ToString(range_ceils).c_str());
GELOGD("Range ceils: %s", ToString(range_ceils).c_str());
return SUCCESS;
}

@ -455,12 +455,11 @@ void BlockMemAssigner::GetOutAndWorkSpaceMem(vector<int64_t> &all_memory_size) {
GetNodeWorkSpaceSize(n, temp);
all_memory_size.insert(all_memory_size.end(), temp.begin(), temp.end());
}
GELOGI("The last atomic_addr_clean node id: %ld", atomic_addr_clean_id_);
for (const auto &pair : symbol_size_) {
all_memory_size.emplace_back(pair.second);
}
sort(all_memory_size.begin(), all_memory_size.end());
GELOGI("All memory size: %s", ToString(all_memory_size).c_str());
GELOGD("All memory size: %s", ToString(all_memory_size).c_str());
for (auto iter = all_memory_size.begin(); iter != all_memory_size.end();) {
if (*iter == 0) {
@ -495,7 +494,7 @@ size_t GetBlockSize(size_t size, const vector<int64_t> &ranges) {
bool IsDirectOutputNode(const NodePtr &node, int idx) {
if ((node != nullptr) && (node->GetOpDesc() != nullptr) && (node->GetOpDesc()->GetType() == NETOUTPUT)) {
GELOGI("This is netoutput node, the input node mem can not be reused");
GELOGD("This is netoutput node, the input node mem can not be reused");
return true;
}
return false;
@ -1219,7 +1218,7 @@ Status BlockMemAssigner::AssignOutputMemoryWithReuse(const NodePtr &node, vector
int64_t stream_id = op_desc->GetStreamId();
vector<int64_t> memorys_type;
bool has_mem_type_attr = ge::AttrUtils::GetListInt(op_desc, ATTR_NAME_OUTPUT_MEM_TYPE_LIST, memorys_type);
GELOGI("Assign memory node[%s], output size[%zu], output memory type size[%zu]", op_desc->GetName().c_str(),
GELOGD("Assign memory node[%s], output size[%zu], output memory type size[%zu]", op_desc->GetName().c_str(),
op_desc->GetOutputsSize(), memorys_type.size());
if (has_mem_type_attr && (memorys_type.size() != op_desc->GetOutputsSize())) {
GELOGE(INTERNAL_ERROR, "fusion: node[%s], output memory size err[outputsize:%zu, memorysize:%zu]",
@ -1311,7 +1310,7 @@ Status BlockMemAssigner::AssignOutputMemoryWithReuse(const NodePtr &node, vector
///
void BlockMemAssigner::AssignMemoryWithReuse(vector<int64_t> &ranges) {
(void)ge::GetContext().GetOption(OPTION_EXEC_DISABLE_REUSED_MEMORY, ge_disable_reuse_mem_env_);
GEEVENT("Reuse memory %s", ge_disable_reuse_mem_env_ == "1" ? "close" : "open");
GELOGD("Reuse memory %s", ge_disable_reuse_mem_env_ == "1" ? "close" : "open");
string op_no_reuse_mem_str;
const char *op_no_reuse_mem = std::getenv(OP_NO_REUSE_MEM);
GE_IF_BOOL_EXEC(op_no_reuse_mem != nullptr, op_no_reuse_mem_str = string(op_no_reuse_mem);
@ -1337,7 +1336,7 @@ void BlockMemAssigner::AssignMemoryWithReuse(vector<int64_t> &ranges) {
vector<bool> workspace_reuse_flag;
GE_IF_BOOL_EXEC(!ge::AttrUtils::GetListBool(node_op_desc, kAttrNameWorkspaceReuseFlag, workspace_reuse_flag),
GELOGD("OP %s get workspace_reuse_flag attr failed", node_op_desc->GetName().c_str()));
GELOGI("Assign memory node[%s], size [temp:%zu, memory type size:%zu]", node_op_desc->GetName().c_str(),
GELOGD("Assign memory node[%s], size [temp:%zu, memory type size:%zu]", node_op_desc->GetName().c_str(),
temp.size(), tvm_workspace_memory_type.size());
if (has_tvm_workspace_mem_type_attr && (temp.size() != tvm_workspace_memory_type.size())) {
@ -1628,7 +1627,7 @@ void BlockMemAssigner::ResizeMemoryBlocks() {
memory_block->SetTailOffset(p2p_mem_offset_ - 1);
}
}
GELOGI("mem_offset_ exclude zero_copy_memory is %zu, p2p_mem_offset_ exclude zero_copy_memory is %zu.",
GELOGD("mem_offset_ exclude zero_copy_memory is %zu, p2p_mem_offset_ exclude zero_copy_memory is %zu.",
mem_offset_, p2p_mem_offset_);
}

@ -117,7 +117,7 @@ Status GraphMemoryAssigner::AssignMemory() {
return ge::FAILED;
}
int64_t var_size_assign = ge::VarManager::Instance(session_id)->GetVarMemSize(RT_MEMORY_HBM) - var_size_before_assign;
GELOGI("GraphMemoryAssigner::AssignMemory variable size = %ld", var_size_assign);
GELOGD("GraphMemoryAssigner::AssignMemory variable size = %ld", var_size_assign);
mem_assigner_ = std::move(mem_assigner);
@ -296,7 +296,6 @@ Status GraphMemoryAssigner::AssignZeroCopyMemory(map<int64_t, size_t> &mem_offse
mem_offset[RT_MEMORY_HBM] += memory_block->Size();
memory_block->SetTailOffset(mem_offset[RT_MEMORY_HBM] - 1);
}
GELOGI("mem_offset_ include zero_copy_memory is %zu.", mem_offset[RT_MEMORY_HBM]);
// set offset for zero copy nodes
priority_assigner->SetOpMemOffset(true);
@ -309,14 +308,13 @@ Status GraphMemoryAssigner::AssignZeroCopyMemory(map<int64_t, size_t> &mem_offse
}
iter->second.mem_offset_ = mem_offset[RT_MEMORY_HBM];
GELOGI("max_mem_offset:%zu, mem_offset:%zu, zero_mem_copy_size:%zu.", mem_offset[RT_MEMORY_HBM], mem_offset_tmp,
GELOGD("max_mem_offset:%zu, mem_offset:%zu, zero_mem_copy_size:%zu.", mem_offset[RT_MEMORY_HBM], mem_offset_tmp,
zero_mem_copy_size);
return SUCCESS;
}
Status GraphMemoryAssigner::ReAssignContinuousMemory(bool is_loop_graph) {
GELOGI("Begin to reassign continuous memory");
Status ret;
for (auto &node : compute_graph_->GetAllNodes()) {
// Get the continuous input type of the node, default is false
@ -387,7 +385,7 @@ Status GraphMemoryAssigner::ReAssignContinuousMemory(bool is_loop_graph) {
}
}
for (auto pair : memory_offset_) {
GELOGI("After reassign continuous memory, memory type = %ld, memoffset = %zu.", pair.first,
GELOGD("After reassign continuous memory, memory type = %ld, memoffset = %zu.", pair.first,
pair.second.mem_offset_);
}
return ge::SUCCESS;
@ -834,7 +832,6 @@ Status GraphMemoryAssigner::ReAssignVirtualNodesMemory(map<string, vector<NodePt
string max_batch_label;
GE_CHK_STATUS_RET(GetMaxBatchLabel(mem_reuse_nodes_map, mem_reuse_model, max_batch_label),
"Get max batch label failed.");
GELOGI("The batch label of max batch virtual nodes is %s.", max_batch_label.c_str());
PrintMemoryOffset();
vector<size_t> nodes_mem_offset_list;
for (auto &i_map : mem_reuse_nodes_map) {
@ -1507,7 +1504,7 @@ ge::Status GraphMemoryAssigner::UpdateOpInputOffset(const NodePtr &node, vector<
GE_CHK_STATUS(TensorUtils::GetDataOffset(tensor_desc, input_offset));
}
GELOGI("%s node[%s] input[%d] is set from node[%s] out index[%lu] offset[%ld]",
GELOGD("%s node[%s] input[%d] is set from node[%s] out index[%lu] offset[%ld]",
has_mem_type_attr == true ? "Fusion" : "",
tmp_op_desc->GetName().c_str(),
valid_input_index,

@ -62,9 +62,9 @@ Status HybridMemAssigner::Assign() {
std::unique_ptr<BlockMemAssigner> priority_assigner;
GELOGI("Binary-block memory size:%zu, max-block memory size:%zu", bin_mem_size, max_mem_size);
GELOGD("Binary-block memory size:%zu, max-block memory size:%zu", bin_mem_size, max_mem_size);
if (bin_mem_size <= max_mem_size) {
GELOGI("Use binary-block memory assigner method");
GELOGD("Use binary-block memory assigner method");
priority_assigner = std::move(binary_assigner);
} else {
GELOGI("Use max-block memory assigner method");

@ -189,7 +189,6 @@ void ModelBuilder::SetInputIsConst(const ge::NodePtr &n) {
GE_IF_BOOL_EXEC(peer_out_anchor == nullptr, continue);
const auto &src_node = peer_out_anchor->GetOwnerNode();
if (!NodeUtils::GetConstOpType(src_node, const_type)) {
GELOGI("Node %s:%zu, sorce node: %s Not Const", n->GetName().c_str(), index, src_node->GetName().c_str());
continue;
}
@ -232,7 +231,6 @@ Status ModelBuilder::AdjustConstWeightSize(const ge::NodePtr &node, size_t &mem_
Status ModelBuilder::SetInputOutputDesc() {
Status ret;
GELOGI("Start to SetInputOutputDesc.");
for (const ge::NodePtr &n : compute_graph_->GetNodes(compute_graph_->GetGraphUnknownFlag())) {
auto node_op_desc = n->GetOpDesc();
@ -245,7 +243,6 @@ Status ModelBuilder::SetInputOutputDesc() {
// final graph.
if ((GetLocalOmgContext().format == domi::DOMI_TENSOR_ND) && (!node_op_desc->HasAttr("_is_single_op")) &&
((node_op_desc->GetType() == DATA_TYPE) || (node_op_desc->GetType() == NETOUTPUT))) {
GELOGI("The node [%s] format should be set ND.", node_op_desc->GetName().c_str());
auto inputDescsPtr = node_op_desc->GetAllInputsDescPtr();
auto outputDescsPtr = node_op_desc->GetAllOutputsDescPtr();
ge::Format format = ge::FORMAT_ND;
@ -290,7 +287,7 @@ void ModelBuilder::AddNodeInputProperty() {
vector<int64_t> src_index_list;
for (const auto &in_data_anchor : node->GetAllInDataAnchors()) {
auto peer_out_anchor = in_data_anchor->GetPeerOutAnchor();
GE_IF_BOOL_EXEC(peer_out_anchor == nullptr, GELOGW("peer_out_anchor is nullptr!"); continue);
GE_IF_BOOL_EXEC(peer_out_anchor == nullptr, continue);
GE_IF_BOOL_EXEC(node_op_desc->HasAttr(MERGE_PRENODE_FLAG), continue);
ge::NodePtr src_node = peer_out_anchor->GetOwnerNode();
@ -347,7 +344,6 @@ void ModelBuilder::AddNodeInputProperty() {
}
Status ModelBuilder::AdjustInputTensorFlag() {
GELOGI("Start to AdjustInputTensorFlag.");
for (const ge::NodePtr &n : compute_graph_->GetNodes(compute_graph_->GetGraphUnknownFlag())) {
if ((n->GetType() == DATA_TYPE) || (n->GetType() == AIPP_DATA_TYPE)) {
GELOGD("Data node: %s.", n->GetName().c_str());
@ -441,7 +437,6 @@ Status ModelBuilder::BuildModelDef(ge::Model &model) {
return FAILED);
const DumpProperties &dump_properties = PropertiesManager::Instance().GetDumpProperties(session_id_);
bool is_op_debug = dump_properties.IsOpDebugOpen();
GELOGI("Get op debug:%d", is_op_debug);
if (is_op_debug) {
if (!ge::AttrUtils::SetBool(&model, ATTR_OP_DEBUG_FLAG, is_op_debug)) {
GELOGE(FAILED, "SetBool of ATTR_OP_DEBUG_FLAG failed.");
@ -608,7 +603,6 @@ Status ModelBuilder::SaveDataToModel(ge::Model &model, ge::GeModel &ge_model) {
}
tbe_name_set.insert(tbe_kernel->GetName());
tbe_kernel_store_.AddTBEKernel(tbe_kernel);
GELOGI("Add tbe kernel bin %s", tbe_kernel->GetName().c_str());
}
for (const ge::NodePtr &n : compute_graph_->GetNodes(compute_graph_->GetGraphUnknownFlag())) {
@ -678,7 +672,6 @@ Status ModelBuilder::PreBuildModel() {
GELOGE(FAILED, "Graph_ is not valid.");
return FAILED;
}
GELOGI("BuildModel begin.");
GE_CHK_STATUS_RET(SetInputOutputDesc(), "SetInputOutputDesc Failed!");

@ -140,7 +140,7 @@ void RunContextUtil::DestroyRtModelResources() noexcept {
Status RunContextUtil::CreateRunContext(Model &model, const ComputeGraphPtr &graph, Buffer &buffer,
const uint64_t session_id) {
GELOGI("Begin to Create RunContext, session_id = %lu", session_id);
GELOGD("Begin to Create RunContext, session_id = %lu", session_id);
// check params
if (graph == nullptr) {
GELOGE(PARAM_INVALID, "CreateRunContext param graph is null. session_id=%lu", session_id);
@ -152,21 +152,21 @@ Status RunContextUtil::CreateRunContext(Model &model, const ComputeGraphPtr &gra
GELOGE(INTERNAL_ERROR, "Get stream_num attr from model_def failed. session_id=%lu", session_id);
return INTERNAL_ERROR;
}
GELOGI("Stream_num = %u", stream_num);
GELOGD("Stream_num = %u", stream_num);
uint32_t event_num = 0;
if (!AttrUtils::GetInt(&model, ATTR_MODEL_EVENT_NUM, event_num)) {
GELOGE(INTERNAL_ERROR, "Get event_num attr from model failed. session_id=%lu", session_id);
return INTERNAL_ERROR;
}
GELOGI("Event_num = %u", event_num);
GELOGD("Event_num = %u", event_num);
uint32_t label_num = 0;
if (!AttrUtils::GetInt(&model, ATTR_MODEL_LABEL_NUM, label_num)) {
GELOGE(INTERNAL_ERROR, "Get label_num attr from model failed. session_id=%lu", session_id);
return INTERNAL_ERROR;
}
GELOGI("Label_num = %u", label_num);
GELOGD("Label_num = %u", label_num);
Status ret = CreateRtModelResources(stream_num, event_num, label_num);
if (ret != SUCCESS) {
@ -198,11 +198,11 @@ Status RunContextUtil::CreateRunContext(Model &model, const ComputeGraphPtr &gra
void RunContextUtil::PrintMemInfo() {
for (auto iter : mem_type_to_data_mem_base_) {
GELOGI("CreateRunContext: memory type = %ld, data memory base = %p", iter.first, iter.second);
GELOGD("CreateRunContext: memory type = %ld, data memory base = %p", iter.first, iter.second);
}
for (auto iter : mem_type_to_data_mem_size_) {
GELOGI("CreateRunContext: memory type = %ld, data memory size = %lu", iter.first, iter.second);
GELOGD("CreateRunContext: memory type = %ld, data memory size = %lu", iter.first, iter.second);
}
}

@ -67,11 +67,10 @@ StreamAllocator::StreamAllocator(ComputeGraphPtr whole_graph, const Graph2SubGra
}
enable_single_stream_ = (single_stream_str == kTrueStr) ? true : false;
GELOGI("Enable single stream: %s.", enable_single_stream_ ? kTrueStr : kFalseStr);
GELOGD("Enable single stream: %s.", enable_single_stream_ ? kTrueStr : kFalseStr);
}
Status StreamAllocator::AssignLogicalStreams(const std::map<std::string, int> &max_parallel_num, bool hcom_parallel) {
GELOGI("Assign logical streams start.");
GE_CHECK_NOTNULL(whole_graph_);
GE_DUMP(whole_graph_, "BeforeAssignedLogicalStreams");
@ -92,15 +91,12 @@ Status StreamAllocator::AssignLogicalStreams(const std::map<std::string, int> &m
return status;
}
GE_DUMP(whole_graph_, "AfterAssignedLogicalStreams");
GELOGI("Assign logical streams success.");
return SUCCESS;
}
// After allocating the logical stream in the graph, refresh the stream in the
// graph and insert the synchronization node.
Status StreamAllocator::RefreshRealStream(int64_t &stream_num, int64_t &event_num) {
GELOGI("RefreshRealStream start.");
GE_CHECK_NOTNULL(whole_graph_);
GE_DUMP(whole_graph_, "BeforeRefreshRealStream");
@ -174,8 +170,7 @@ Status StreamAllocator::RefreshRealStream(int64_t &stream_num, int64_t &event_nu
GELOGI("None of nodes need to assign stream, stream num is 0, it will cause error, so change it to 1");
stream_num_ = 1;
}
GELOGI("stream num: %ld, event num: %u.", stream_num_, event_num_);
GELOGI("RefreshRealStream successfully.");
GELOGD("stream num: %ld, event num: %u.", stream_num_, event_num_);
stream_num = stream_num_;
event_num = static_cast<int64_t>(event_num_);
@ -1241,7 +1236,7 @@ void StreamAllocator::DumpEvents() {
for (const auto &one_pair : after_refresh_stream_nodes) {
int64_t stream_id = one_pair.first;
GELOGI("After RefreshRealStream: stream %ld.", stream_id);
GELOGD("After RefreshRealStream: stream %ld.", stream_id);
for (const auto &node : one_pair.second) {
string send_event_str;
@ -1273,7 +1268,7 @@ Status StreamAllocator::GetMaxStreamAndTask(bool huge_stream, uint32_t &max_stre
GELOGE(FAILED, "Get max stream and task count by rts failed.");
return FAILED;
}
GELOGI("Allowed max stream count: %u, max task count per stream: %u.", max_stream_count, max_task_count);
GELOGD("Allowed max stream count: %u, max task count per stream: %u.", max_stream_count, max_task_count);
return SUCCESS;
}

@ -30,7 +30,7 @@ StreamGraphOptimizer::~StreamGraphOptimizer() {}
void StreamGraphOptimizer::RefreshNodeId(const ComputeGraphPtr &comp_graph, Graph2SubGraphInfoList &subgraph_map) {
size_t node_size = comp_graph->GetAllNodesSize();
GELOGI("Refresh placeholder and end nodeId start from node num: %zu", node_size);
GELOGD("Refresh placeholder and end nodeId start from node num: %zu", node_size);
for (const auto &subgraph_pair : subgraph_map) {
for (const auto &subgraph_info : subgraph_pair.second) {
ComputeGraphPtr subgraph = subgraph_info->GetSubGraph();
@ -74,8 +74,6 @@ bool StreamGraphOptimizer::IsSameStreamId(const ComputeGraphPtr &comp_graph) {
Status StreamGraphOptimizer::OptimizeStreamedSubGraph(const ComputeGraphPtr &comp_graph,
Graph2SubGraphInfoList &subgraph_map,
struct RunContext &run_context) {
GELOGI("Optimize streamed subgraph start.");
RefreshNodeId(comp_graph, subgraph_map);
std::shared_ptr<GELib> instance = ge::GELib::GetInstance();
@ -86,7 +84,7 @@ Status StreamGraphOptimizer::OptimizeStreamedSubGraph(const ComputeGraphPtr &com
ComputeGraphPtr subgraph = subgraph_info->GetSubGraph();
GE_CHECK_NOTNULL(subgraph);
GELOGI("Optimize subgraph %s", subgraph->GetName().c_str());
GELOGD("Optimize subgraph %s", subgraph->GetName().c_str());
std::string engine_name = subgraph_info->GetEngineName();
@ -128,7 +126,7 @@ Status StreamGraphOptimizer::OptimizeStreamedSubGraph(const ComputeGraphPtr &com
subgraph->GetName().c_str(), engine_name.c_str(), graph_optimizers.size(), ret);
return ret;
}
GELOGI(
GELOGD(
"[optimizeStreamedSubGraph]: optimize streamed subgraph success, subgraph: %s, engine_name: %s, graph "
"Optimizer num: %zu!",
subgraph->GetName().c_str(), engine_name.c_str(), graph_optimizers.size());
@ -137,7 +135,7 @@ Status StreamGraphOptimizer::OptimizeStreamedSubGraph(const ComputeGraphPtr &com
}
}
GELOGI("Optimize streamed subgraph success.");
GELOGD("Optimize streamed subgraph success.");
return SUCCESS;
}
} // namespace ge

@ -68,7 +68,7 @@ TaskGenerator::TaskGenerator(uint8_t *var_mem_base, uint64_t var_mem_size) {
TaskGenerator::~TaskGenerator() {}
Status TaskGenerator::GetTaskInfo(Model &model, ComputeGraphPtr &graph, uint64_t session_id, RunContext &run_context) {
GELOGI("Begin to Get TaskInfo. session_id=%lu", session_id);
GELOGD("Begin to Get TaskInfo. session_id=%lu", session_id);
// Check params
if (graph == nullptr) {
GELOGE(PARAM_INVALID, "GetTaskInfo param graph is null. session_id=%lu", session_id);
@ -120,7 +120,7 @@ Status TaskGenerator::GetTaskInfo(Model &model, ComputeGraphPtr &graph, uint64_t
return ret;
}
GELOGI("Get TaskInfo success. session_id=%lu", session_id);
GELOGD("Get TaskInfo success. session_id=%lu", session_id);
return SUCCESS;
}
@ -232,7 +232,7 @@ Status TaskGenerator::SaveFusionNodes(map<int64_t, std::vector<NodePtr>> &fusion
}
}
}
GELOGI("Fusion: get fusion group numbers [%zu].", fusion_nodes.size());
GELOGD("Fusion: get fusion group numbers [%zu].", fusion_nodes.size());
return SUCCESS;
}
@ -575,7 +575,7 @@ Status TaskGenerator::MarkFirstAndLastOps(const vector<OpDescPtr> &ops, bool is_
continuous_op_lists.back().emplace_back(op_desc);
}
}
GELOGI("Number of continuous node lists is %zu.", continuous_op_lists.size());
GELOGD("Number of continuous node lists is %zu.", continuous_op_lists.size());
for (const auto &continuous_ops : continuous_op_lists) {
map<string, std::pair<OpDescPtr, OpDescPtr>> first_and_last_ops;
@ -846,13 +846,12 @@ Status TaskGenerator::GetFpBpIndex(const ComputeGraphPtr &graph, ProfilingPoint
Status TaskGenerator::FindProfilingTaskIndex(const ComputeGraphPtr &graph, ProfilingPoint &profiling_point,
vector<uint32_t> &all_reduce_nodes) const {
GELOGI("Start FindProfilingTaskIndex.");
GE_CHECK_NOTNULL(graph);
const char *profiling_mode = std::getenv(kProfilingMode);
bool is_profiling = (profiling_mode != nullptr) || ProfilingManager::Instance().ProfilingOn() ||
ProfilingManager::Instance().ProfilingTrainingTraceOn();
if (!is_profiling) {
GELOGW("Profiling is not open.");
GELOGD("Profiling is not open.");
return SUCCESS;
}

@ -115,7 +115,7 @@ Status GraphExecutor::FreeInOutBuffer() {
malloc_flag_ = false;
return SUCCESS;
} else {
GELOGI("[GraphManager] not malloc buffer.");
GELOGD("[GraphManager] not malloc buffer.");
return SUCCESS;
}
}

@ -286,7 +286,7 @@ Status GraphLoader::ExecuteModel(uint32_t model_id, rtStream_t stream, bool asyn
return ret;
}
GELOGI("Execute model success, model_id:%u.", model_id);
GELOGD("Execute model success, model_id:%u.", model_id);
return SUCCESS;
}

@ -159,7 +159,6 @@ void DataDumper::SetLoopAddr(void *global_step, void *loop_per_iter, void *loop_
}
void DataDumper::SaveDumpInput(const std::shared_ptr<Node> &node) {
GELOGI("Start to save data %s message", node->GetName().c_str());
if (node != nullptr) {
auto input_op_desc = node->GetOpDesc();
if (input_op_desc == nullptr) {
@ -180,7 +179,6 @@ void DataDumper::SaveDumpInput(const std::shared_ptr<Node> &node) {
{op_desc->GetName(), {input_op_desc, dst_in_data_anchor->GetIdx(), out_data_anchor->GetIdx()}});
}
}
GELOGI("Save data message successfully");
}
}
@ -218,7 +216,7 @@ void DataDumper::SaveDumpOpInfo(const RuntimeParam &model_param, const OpDescPtr
GELOGW("Get input size failed");
return;
}
GELOGI("Save dump op info, the input size is %ld", input_size);
GELOGD("Save dump op info, the input size is %ld", input_size);
op_desc_info.input_size.emplace_back(input_size);
}
for (size_t j = 0; j < op->GetOutputsSize(); ++j) {
@ -234,7 +232,7 @@ void DataDumper::SaveDumpOpInfo(const RuntimeParam &model_param, const OpDescPtr
GELOGW("Get input size failed");
return;
}
GELOGI("Save dump op info, the output size is %ld", output_size);
GELOGD("Save dump op info, the output size is %ld", output_size);
op_desc_info.output_size.emplace_back(output_size);
}
op_desc_info.input_addrs = ModelUtils::GetInputDataAddrs(model_param, op);
@ -301,22 +299,16 @@ static void SetOpMappingLoopAddr(uintptr_t step_id, uintptr_t loop_per_iter, uin
if (step_id != 0) {
GELOGI("step_id exists.");
op_mapping_info.set_step_id_addr(static_cast<uint64_t>(step_id));
} else {
GELOGI("step_id is null.");
}
if (loop_per_iter != 0) {
GELOGI("loop_per_iter exists.");
op_mapping_info.set_iterations_per_loop_addr(static_cast<uint64_t>(loop_per_iter));
} else {
GELOGI("loop_per_iter is null.");
}
if (loop_cond != 0) {
GELOGI("loop_cond exists.");
op_mapping_info.set_loop_cond_addr(static_cast<uint64_t>(loop_cond));
} else {
GELOGI("loop_cond is null.");
}
}
@ -672,7 +664,7 @@ Status DataDumper::LoadDumpInfo() {
PrintCheckLog(dump_list_key);
if (op_list_.empty()) {
GELOGW("op_list_ is empty");
GELOGD("op_list_ is empty");
}
aicpu::dump::OpMappingInfo op_mapping_info;
@ -684,8 +676,6 @@ Status DataDumper::LoadDumpInfo() {
op_mapping_info.set_flag(kAicpuLoadFlag);
op_mapping_info.set_dump_step(dump_properties_.GetDumpStep());
SetOpMappingLoopAddr(global_step_, loop_per_iter_, loop_cond_, op_mapping_info);
GELOGI("Dump step is %s and dump path is %s dump model is %s in load dump info",
dump_properties_.GetDumpStep().c_str(), dump_path.c_str(), dump_list_key.c_str());
auto ret = BuildTaskInfo(op_mapping_info);
if (ret != SUCCESS) {
GELOGE(ret, "Build task info failed");
@ -812,7 +802,6 @@ void DataDumper::SetOpDebugIdToAicpu(uint32_t task_id, uint32_t stream_id, void
Status DataDumper::UnloadDumpInfo() {
if (!load_flag_) {
GELOGI("No need to UnloadDumpInfo.");
load_flag_ = false;
return SUCCESS;
}
@ -838,7 +827,6 @@ Status DataDumper::UnloadDumpInfo() {
void DataDumper::PrintCheckLog(string &dump_list_key) {
std::set<std::string> model_list = dump_properties_.GetAllDumpModel();
if (model_list.empty()) {
GELOGI("No model need dump.");
return;
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save