@@ -25,7 +25,7 @@ void CustAICPUKernelStore::AddCustAICPUKernel(const CustAICPUKernelPtr &kernel) | |||||
} | } | ||||
void CustAICPUKernelStore::LoadCustAICPUKernelBinToOpDesc(const std::shared_ptr<ge::OpDesc> &op_desc) const { | void CustAICPUKernelStore::LoadCustAICPUKernelBinToOpDesc(const std::shared_ptr<ge::OpDesc> &op_desc) const { | ||||
GELOGI("LoadCustAICPUKernelBinToOpDesc in"); | |||||
GELOGD("LoadCustAICPUKernelBinToOpDesc in"); | |||||
if (op_desc != nullptr) { | if (op_desc != nullptr) { | ||||
auto kernel_bin = FindKernel(op_desc->GetName()); | auto kernel_bin = FindKernel(op_desc->GetName()); | ||||
if (kernel_bin != nullptr) { | 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("Load cust aicpu kernel:%s, %zu", kernel_bin->GetName().c_str(), kernel_bin->GetBinDataSize()); | ||||
} | } | ||||
} | } | ||||
GELOGI("LoadCustAICPUKernelBinToOpDesc success"); | |||||
GELOGD("LoadCustAICPUKernelBinToOpDesc success"); | |||||
} | } | ||||
} // namespace ge | } // namespace ge |
@@ -98,7 +98,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::SaveToOmMod | |||||
ge::Buffer model_buffer; | ge::Buffer model_buffer; | ||||
(void)model_tmp->Save(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 (model_buffer.GetSize() > 0) { | ||||
if (SaveModelPartition(om_file_save_helper, ModelPartitionType::MODEL_DEF, model_buffer.GetData(), | if (SaveModelPartition(om_file_save_helper, ModelPartitionType::MODEL_DEF, model_buffer.GetData(), | ||||
model_buffer.GetSize()) != SUCCESS) { | 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(); | 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 | // weight is not necessary | ||||
if (ge_model_weight.GetSize() > 0) { | if (ge_model_weight.GetSize() > 0) { | ||||
GE_CHK_STATUS_RET(SaveModelPartition(om_file_save_helper, | 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(); | 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) { | if (tbe_kernel_store.DataSize() > 0) { | ||||
GE_CHK_STATUS_RET(SaveModelPartition(om_file_save_helper, | GE_CHK_STATUS_RET(SaveModelPartition(om_file_save_helper, | ||||
ModelPartitionType::TBE_KERNELS, | 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()); | (void)tbe_kernel_store.Load(tbe_kernel_store.Data(), tbe_kernel_store.DataSize()); | ||||
CustAICPUKernelStore cust_aicpu_kernel_store = ge_model->GetCustAICPUKernelStore(); | 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) { | if (cust_aicpu_kernel_store.DataSize() > 0) { | ||||
GE_CHK_STATUS_RET(SaveModelPartition(om_file_save_helper, | GE_CHK_STATUS_RET(SaveModelPartition(om_file_save_helper, | ||||
ModelPartitionType::CUST_AICPU_KERNELS, | 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)); | (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(), | if (SaveModelPartition(om_file_save_helper, ModelPartitionType::TASK_INFO, task_buffer.GetData(), | ||||
partition_task_size) != SUCCESS) { | 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.platform_type = ge_model->GetPlatformType(); | ||||
model_header.om_ir_version = ge_model->GetVersion(); | model_header.om_ir_version = ge_model->GetVersion(); | ||||
std::string platform_version = ge_model->GetPlatformVersion(); | std::string platform_version = ge_model->GetPlatformVersion(); | ||||
GELOGI("Platform version save: %s", platform_version.c_str()); | |||||
errno_t err; | errno_t err; | ||||
err = memcpy_s(model_header.platform_version, PLATFORM_VERSION_LEN, platform_version.c_str(), | 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; | return MEMALLOC_FAILED; | ||||
} | } | ||||
string version = reinterpret_cast<char *>(model_header.platform_version); | 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(); | size_t name_size = ge_model->GetName().size(); | ||||
name_size = name_size > (MODEL_NAME_LENGTH - 1) ? (MODEL_NAME_LENGTH - 1) : name_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; | return MEMALLOC_FAILED; | ||||
} | } | ||||
string model_name = reinterpret_cast<char *>(model_header.name); | 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_); | Status ret = om_file_save_helper->SaveModel(save_param, output_file.c_str(), model, is_offline_); | ||||
if (ret != SUCCESS) { | if (ret != SUCCESS) { | ||||
@@ -346,7 +345,7 @@ Status ModelHelper::LoadModelData(OmFileLoadHelper &om_load_helper) { | |||||
ModelPartition partition_model_def; | ModelPartition partition_model_def; | ||||
// no need to check value, DATA->NetOutput | // no need to check value, DATA->NetOutput | ||||
om_load_helper.GetModelPartition(ModelPartitionType::MODEL_DEF, partition_model_def); | 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; | ge::Model model; | ||||
if (ge::Model::Load(partition_model_def.data, partition_model_def.size, model) != SUCCESS) { | 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); | ge::Buffer weight = ge::Buffer::CopyFrom(partition.data, partition.size); | ||||
model_->SetWeight(weight); | model_->SetWeight(weight); | ||||
GELOGI("GetWeight size:%u", partition.size); | |||||
GELOGD("GetWeight size:%u", partition.size); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -393,7 +392,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::LoadTask(Om | |||||
GELOGE(INTERNAL_ERROR, "ReadProtoFromArray failed."); | GELOGE(INTERNAL_ERROR, "ReadProtoFromArray failed."); | ||||
return INTERNAL_ERROR; | 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); | model_->SetModelTaskDef(task); | ||||
return SUCCESS; | return SUCCESS; | ||||
@@ -404,9 +403,9 @@ Status ModelHelper::LoadTBEKernelStore(OmFileLoadHelper &om_load_helper) { | |||||
ModelPartition partition_kernel_def; | ModelPartition partition_kernel_def; | ||||
TBEKernelStore kernel_store; | TBEKernelStore kernel_store; | ||||
if (om_load_helper.GetModelPartition(ModelPartitionType::TBE_KERNELS, partition_kernel_def) == SUCCESS) { | 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)) { | if (kernel_store.Load(partition_kernel_def.data, partition_kernel_def.size)) { | ||||
GELOGI("Load tbe kernels success"); | |||||
GELOGD("Load tbe kernels success"); | |||||
} else { | } else { | ||||
GELOGW("Load tbe kernels failed"); | GELOGW("Load tbe kernels failed"); | ||||
} | } | ||||
@@ -420,11 +419,9 @@ Status ModelHelper::LoadCustAICPUKernelStore(OmFileLoadHelper &om_load_helper) { | |||||
ModelPartition partition_kernel_def; | ModelPartition partition_kernel_def; | ||||
CustAICPUKernelStore kernel_store; | CustAICPUKernelStore kernel_store; | ||||
if (om_load_helper.GetModelPartition(ModelPartitionType::CUST_AICPU_KERNELS, partition_kernel_def) == SUCCESS) { | 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)) { | if (kernel_store.Load(partition_kernel_def.data, partition_kernel_def.size)) { | ||||
GELOGI("Load cust aicpu kernels success"); | GELOGI("Load cust aicpu kernels success"); | ||||
} else { | |||||
GELOGW("Load cust aicpu kernels failed"); | |||||
} | } | ||||
} | } | ||||
model_->SetCustAICPUKernelStore(kernel_store); | 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; | return ACL_ERROR_GE_EXEC_MODEL_PARTITION_NUM_INVALID; | ||||
} | } | ||||
size_t mem_offset = SIZE_OF_MODEL_PARTITION_TABLE(*partition_table); | 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); | partition_table->num, sizeof(ModelFileHeader), mem_offset); | ||||
if (model_data_size <= 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", | 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; | return ACL_ERROR_GE_EXEC_MODEL_DATA_SIZE_INVALID; | ||||
} | } | ||||
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 SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -167,7 +167,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ModelPartitionTable *OmFileSave | |||||
ModelPartition partition = context_.partition_datas_[i]; | ModelPartition partition = context_.partition_datas_[i]; | ||||
partition_table->partition[i] = {partition.type, mem_offset, partition.size}; | partition_table->partition[i] = {partition.type, mem_offset, partition.size}; | ||||
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; | return partition_table; | ||||
} | } | ||||
@@ -191,7 +191,7 @@ Status OmFileSaveHelper::SaveModel(const SaveParam &save_param, const char *outp | |||||
(void)save_param.pri_key_file; | (void)save_param.pri_key_file; | ||||
Status ret = SaveModelToFile(output_file, model, is_offline); | Status ret = SaveModelToFile(output_file, model, is_offline); | ||||
if (ret == SUCCESS) { | if (ret == SUCCESS) { | ||||
GELOGI("Generate model with encrypt."); | |||||
GELOGD("Generate model with encrypt."); | |||||
} | } | ||||
return ret; | return ret; | ||||
} | } | ||||
@@ -213,7 +213,7 @@ Status OmFileSaveHelper::SaveModelToFile(const char *output_file, ModelBufferDat | |||||
FMK_UINT32_ADDCHECK(size_of_table, model_data_len) | FMK_UINT32_ADDCHECK(size_of_table, model_data_len) | ||||
model_header_.length = 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)); | sizeof(ModelFileHeader), size_of_table, model_data_len, model_header_.length + sizeof(ModelFileHeader)); | ||||
std::vector<ModelPartition> partition_datas = context_.partition_datas_; | 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); | ret = FileSaver::SaveToBuffWithFileHeader(model_header_, *partition_table, partition_datas, model); | ||||
} | } | ||||
if (ret == SUCCESS) { | if (ret == SUCCESS) { | ||||
GELOGI("Save model success without encrypt."); | |||||
GELOGD("Save model success without encrypt."); | |||||
} | } | ||||
return ret; | return ret; | ||||
#else | #else | ||||
@@ -51,7 +51,7 @@ bool KernelStore::Build() { | |||||
kernel_head.name_len = static_cast<uint32_t>(kernel->GetName().length()); | kernel_head.name_len = static_cast<uint32_t>(kernel->GetName().length()); | ||||
kernel_head.bin_len = static_cast<uint32_t>(kernel->GetBinDataSize()); | 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()); | kernel->GetName().c_str(), kernel->GetBinData(), kernel->GetBinDataSize()); | ||||
mem_ret = memcpy_s(next_buffer, remain_len, &kernel_head, sizeof(kernel_head)); | mem_ret = memcpy_s(next_buffer, remain_len, &kernel_head, sizeof(kernel_head)); | ||||
GE_CHK_BOOL_EXEC_NOLOG(mem_ret == EOK, return false); | 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); | std::string name(next_buffer, kernel_head->name_len); | ||||
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); | 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)); | KernelBinPtr teb_kernel_ptr = ge::MakeShared<KernelBin>(name, std::move(kernel_bin)); | ||||
if (teb_kernel_ptr != nullptr) { | if (teb_kernel_ptr != nullptr) { | ||||
@@ -106,7 +106,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelParserBase::ParseMo | |||||
model_data = data; | model_data = data; | ||||
model_len = file_header->length; | 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 { | } else { | ||||
GELOGE(ACL_ERROR_GE_EXEC_MODEL_NOT_SUPPORT_ENCRYPTION, "Invalid model. ModelEncryptType not supported."); | GELOGE(ACL_ERROR_GE_EXEC_MODEL_NOT_SUPPORT_ENCRYPTION, "Invalid model. ModelEncryptType not supported."); | ||||
res = ACL_ERROR_GE_EXEC_MODEL_NOT_SUPPORT_ENCRYPTION; | 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); | GELOGE(rt_ret, "runtime get logic_device_id failed, current logic_device_id:%d", logic_device_id); | ||||
return; | return; | ||||
} | } | ||||
GELOGI("current logic_device_id:%d", logic_device_id); | |||||
GELOGD("current logic_device_id:%d", logic_device_id); | |||||
if (check_device) { | if (check_device) { | ||||
auto ret = std::find(device_id_.begin(), device_id_.end(), logic_device_id); | auto ret = std::find(device_id_.begin(), device_id_.end(), logic_device_id); | ||||
if (ret == device_id_.end()) { | if (ret == device_id_.end()) { | ||||
@@ -566,11 +566,11 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY void ProfilingManager::ReportPr | |||||
return; | return; | ||||
} | } | ||||
} | } | ||||
GELOGI("start ProfilingTaskDescInfo."); | |||||
GELOGD("start ProfilingTaskDescInfo."); | |||||
ProfilingTaskDescInfo(model_id, task_desc_info, logic_device_id); | 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); | 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 | #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++) { | for (int32_t i = 0; i < device_num; i++) { | ||||
device_id_ptr[i] = static_cast<uint32_t>(device_list[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()); | rtError_t rt_ret = rtProfilerStart(module, device_num, device_id_ptr.get()); | ||||
if (rt_ret != RT_ERROR_NONE) { | 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."); | GELOGW("Prof start: load model module is invalid."); | ||||
} | } | ||||
UpdateDeviceIdModuleMap(kProfStart, module, device_list); | UpdateDeviceIdModuleMap(kProfStart, module, device_list); | ||||
GELOGI("Prof start profiling success."); | |||||
GELOGD("Prof start profiling success."); | |||||
#endif | #endif | ||||
return SUCCESS; | 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++) { | for (int32_t i = 0; i < device_num; i++) { | ||||
device_id_ptr[i] = static_cast<uint32_t>(device_list[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()); | rtError_t rt_ret = rtProfilerStop(module, device_num, device_id_ptr.get()); | ||||
if (rt_ret != RT_ERROR_NONE) { | if (rt_ret != RT_ERROR_NONE) { | ||||
GELOGE(FAILED, "Prof stop: runtime profiler config proc failed."); | 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."); | GELOGW("Prof stop: load model module is invalid."); | ||||
} | } | ||||
UpdateDeviceIdModuleMap(kProfStop, module, device_list); | UpdateDeviceIdModuleMap(kProfStop, module, device_list); | ||||
GELOGI("Prof stop profiling success."); | |||||
GELOGD("Prof stop profiling success."); | |||||
#endif | #endif | ||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -963,14 +963,14 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY bool ProfilingManager::Profilin | |||||
if (rt_ret != RT_ERROR_NONE) { | if (rt_ret != RT_ERROR_NONE) { | ||||
GELOGE(rt_ret, "Runtime get logic_device_id failed, current logic_device_id:%d", logic_device_id); | 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; | bool execute_model_prof_on = false; | ||||
auto iter = std::find(device_id_.begin(), device_id_.end(), logic_device_id); | auto iter = std::find(device_id_.begin(), device_id_.end(), logic_device_id); | ||||
if (iter != device_id_.end()) { | if (iter != device_id_.end()) { | ||||
execute_model_prof_on = true; | 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; | 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) { | Status GeExecutor::UnloadModel(uint32_t model_id) { | ||||
GELOGI("unload model %u begin.", model_id); | |||||
GELOGD("unload model %u begin.", model_id); | |||||
if (!isInit_) { | if (!isInit_) { | ||||
GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "GeExecutor has not been initialized!"); | GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "GeExecutor has not been initialized!"); | ||||
return ACL_ERROR_GE_EXEC_NOT_INIT; | 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 | // Get input and output descriptor | ||||
Status GeExecutor::GetModelDescInfo(uint32_t model_id, std::vector<ge::TensorDesc> &input_desc, | Status GeExecutor::GetModelDescInfo(uint32_t model_id, std::vector<ge::TensorDesc> &input_desc, | ||||
std::vector<ge::TensorDesc> &output_desc, bool new_model_desc) { | std::vector<ge::TensorDesc> &output_desc, bool new_model_desc) { | ||||
GELOGI("get model desc info begin."); | |||||
if (!isInit_) { | if (!isInit_) { | ||||
GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "GeExecutor has not been initialized!"); | GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "GeExecutor has not been initialized!"); | ||||
return ACL_ERROR_GE_EXEC_NOT_INIT; | 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(input_desc, input_desc_infos, input_formats); | ||||
GetGeTensorDescFromDomiInfo(output_desc, output_desc_infos, output_formats); | GetGeTensorDescFromDomiInfo(output_desc, output_desc_infos, output_formats); | ||||
GELOGI("get model desc info end."); | |||||
return ge::SUCCESS; | 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, | Status GeExecutor::GetDynamicBatchInfo(uint32_t model_id, std::vector<std::vector<int64_t>> &batch_info, | ||||
int32_t &dynamic_type) { | int32_t &dynamic_type) { | ||||
GELOGI("Begin to get dynamic batch info."); | |||||
if (!isInit_) { | if (!isInit_) { | ||||
GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "GeExecutor has not been initialized!"); | GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "GeExecutor has not been initialized!"); | ||||
return ACL_ERROR_GE_EXEC_NOT_INIT; | 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."); | GELOGE(ret, "GetDynamicBatchInfo failed."); | ||||
return ret; | return ret; | ||||
} | } | ||||
GELOGI("Get dynamic batch info succ."); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -727,7 +722,6 @@ Status GeExecutor::GetCombinedDynamicDims(uint32_t model_id, vector<vector<int64 | |||||
/// @return execute result | /// @return execute result | ||||
/// | /// | ||||
Status GeExecutor::GetUserDesignateShapeOrder(uint32_t model_id, vector<string> &user_designate_shape_order) { | Status GeExecutor::GetUserDesignateShapeOrder(uint32_t model_id, vector<string> &user_designate_shape_order) { | ||||
GELOGI("Begin to get user designate shape info."); | |||||
if (!isInit_) { | if (!isInit_) { | ||||
GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "GeExecutor has not been initialized!"); | GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "GeExecutor has not been initialized!"); | ||||
return ACL_ERROR_GE_EXEC_NOT_INIT; | return ACL_ERROR_GE_EXEC_NOT_INIT; | ||||
@@ -739,7 +733,6 @@ Status GeExecutor::GetUserDesignateShapeOrder(uint32_t model_id, vector<string> | |||||
return ret; | return ret; | ||||
} | } | ||||
GELOGI("Get user designate shape order succ."); | |||||
return SUCCESS; | 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) { | 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_) { | if (!isInit_) { | ||||
GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "not inited yet!"); | GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "not inited yet!"); | ||||
return ACL_ERROR_GE_EXEC_NOT_INIT; | 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."); | GELOGE(ret, "Get dynamic batch output shape info failed."); | ||||
return ret; | return ret; | ||||
} | } | ||||
GELOGI("Get dynamic batch output shape info succ."); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -835,8 +825,6 @@ Status GeExecutor::GetModelDescInfoForZeroCopy(uint32_t model_id, std::vector<ge | |||||
} | } | ||||
Status GeExecutor::CommandHandle(const Command &command) { | Status GeExecutor::CommandHandle(const Command &command) { | ||||
GELOGI("command handle begin."); | |||||
Status ret = GraphLoader::CommandHandle(command); | Status ret = GraphLoader::CommandHandle(command); | ||||
if (ret != SUCCESS) { | if (ret != SUCCESS) { | ||||
GELOGE(ACL_ERROR_GE_COMMAND_HANDLE, "CommandHandle: Command Handle failed."); | 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, | 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) { | void *weight_ptr, size_t weight_size) { | ||||
GELOGI("Load model from data begin."); | |||||
if (!isInit_) { | if (!isInit_) { | ||||
GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "not inited yet!"); | GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "not inited yet!"); | ||||
return ACL_ERROR_GE_EXEC_NOT_INIT; | 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, | Status GeExecutor::ExecModel(uint32_t model_id, void *stream, const ge::RunModelData &run_input_data, | ||||
ge::RunModelData &run_output_data, bool async_mode) { | ge::RunModelData &run_output_data, bool async_mode) { | ||||
GELOGI("Execute model begin."); | |||||
if (!isInit_) { | if (!isInit_) { | ||||
GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "GeExecutor has not been initialized!"); | GELOGE(ACL_ERROR_GE_EXEC_NOT_INIT, "GeExecutor has not been initialized!"); | ||||
return ACL_ERROR_GE_EXEC_NOT_INIT; | 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); | TypeUtils::DataTypeToSerialString(data_type).c_str(), output_mem_size); | ||||
return FAILED; | return FAILED; | ||||
} | } | ||||
GELOGI( | |||||
GELOGD( | |||||
"Calc op[%s:%s] out[%zu] mem size is %ld," | "Calc op[%s:%s] out[%zu] mem size is %ld," | ||||
" format=%s, data_type=%s.", | " format=%s, data_type=%s.", | ||||
node_name.c_str(), node_type.c_str(), i, output_mem_size, TypeUtils::FormatToSerialString(format).c_str(), | 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()); | GELOGE(ret, "Node:%s(%s) op run failed.", name.c_str(), type.c_str()); | ||||
return ret; | 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; | return ret; | ||||
} | } | ||||
} // namespace ge_local | } // namespace ge_local | ||||
@@ -24,7 +24,7 @@ namespace ge_local { | |||||
NoOp::NoOp(const Node &node, RunContext &run_context) : Op(node, run_context) {} | NoOp::NoOp(const Node &node, RunContext &run_context) : Op(node, run_context) {} | ||||
Status NoOp::Run() { | 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 | // Do nothing | ||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -200,7 +200,6 @@ static Status AddOutputs(const ComputeGraphPtr &graph, const NodePtr &node, cons | |||||
} | } | ||||
static void GetOpsProtoPath(string &opsproto_path) { | static void GetOpsProtoPath(string &opsproto_path) { | ||||
GELOGI("Start to get ops proto path schedule."); | |||||
const char *path_env = std::getenv("ASCEND_OPP_PATH"); | const char *path_env = std::getenv("ASCEND_OPP_PATH"); | ||||
if (path_env != nullptr) { | if (path_env != nullptr) { | ||||
string path = path_env; | 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()); | version = temp.substr(pos + flag.size()); | ||||
GELOGI("Version=%s", version.c_str()); | |||||
return true; | return true; | ||||
} | } | ||||
@@ -425,7 +423,6 @@ bool GeGenerator::Impl::SetAtcVersionInfo(AttrHolder &obj) { | |||||
path_base = path_base.substr(0, path_base.rfind('/') + 1); | path_base = path_base.substr(0, path_base.rfind('/') + 1); | ||||
std::string version_path = path_base + "version.info"; | std::string version_path = path_base + "version.info"; | ||||
GELOGI("version_path is %s", version_path.c_str()); | |||||
std::string version; | std::string version; | ||||
if (!GetVersionFromPath(version_path, version)) { | if (!GetVersionFromPath(version_path, version)) { | ||||
GELOGW("Get atc version information failed!"); | GELOGW("Get atc version information failed!"); | ||||
@@ -436,7 +433,6 @@ bool GeGenerator::Impl::SetAtcVersionInfo(AttrHolder &obj) { | |||||
GELOGW("Ge model set atc version failed!"); | GELOGW("Ge model set atc version failed!"); | ||||
return false; | return false; | ||||
} | } | ||||
GELOGI("Ge model set atc version information success."); | |||||
return true; | return true; | ||||
} | } | ||||
@@ -449,7 +445,6 @@ bool GeGenerator::Impl::SetOppVersionInfo(AttrHolder &obj) { | |||||
} | } | ||||
std::string version_path = path_env; | std::string version_path = path_env; | ||||
version_path += "/version.info"; | version_path += "/version.info"; | ||||
GELOGI("version_path is %s", version_path.c_str()); | |||||
std::string version; | std::string version; | ||||
if (!GetVersionFromPath(version_path, version)) { | if (!GetVersionFromPath(version_path, version)) { | ||||
GELOGW("Get opp version information failed!"); | GELOGW("Get opp version information failed!"); | ||||
@@ -460,7 +455,6 @@ bool GeGenerator::Impl::SetOppVersionInfo(AttrHolder &obj) { | |||||
GELOGW("Ge model set opp version failed!"); | GELOGW("Ge model set opp version failed!"); | ||||
return false; | return false; | ||||
} | } | ||||
GELOGI("Ge Model set opp version information success."); | |||||
return true; | return true; | ||||
} | } | ||||
@@ -469,7 +463,7 @@ Status GeGenerator::GenerateModel(const Graph &graph, const string &file_name_pr | |||||
rtContext_t ctx = nullptr; | rtContext_t ctx = nullptr; | ||||
auto rt = rtCtxGetCurrent(&ctx); | auto rt = rtCtxGetCurrent(&ctx); | ||||
if (rt != RT_ERROR_NONE) { | if (rt != RT_ERROR_NONE) { | ||||
GELOGW("Current ctx is null."); | |||||
GELOGD("Current ctx is null."); | |||||
ctx = nullptr; | ctx = nullptr; | ||||
} | } | ||||
@@ -524,7 +518,6 @@ Status GeGenerator::GenerateModel(const Graph &graph, const string &file_name_pr | |||||
(void)rtCtxSetCurrent(ctx); | (void)rtCtxSetCurrent(ctx); | ||||
} | } | ||||
GELOGI("GenerateOfflineModel success."); | |||||
return 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; | return GE_GENERATOR_GRAPH_MANAGER_ADD_GRAPH_FAILED; | ||||
} | } | ||||
GELOGI("Model inputs size is %zu", inputs.size()); | |||||
graph_manager_.SetOptionsRunGraphFlag(false); | graph_manager_.SetOptionsRunGraphFlag(false); | ||||
static std::atomic<uint64_t> atomic_session_id(0); | 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) { | Status GraphBuilder::CalcOpParam(const ge::ComputeGraphPtr &graph) { | ||||
GELOGI("Begin to calculate op running param."); | |||||
GE_CHECK_NOTNULL(graph); | GE_CHECK_NOTNULL(graph); | ||||
auto instance_ptr = ge::GELib::GetInstance(); | auto instance_ptr = ge::GELib::GetInstance(); | ||||
if (instance_ptr == nullptr || !instance_ptr->InitFlag()) { | if (instance_ptr == nullptr || !instance_ptr->InitFlag()) { | ||||
@@ -140,7 +139,6 @@ Status GraphBuilder::CalcOpParam(const ge::ComputeGraphPtr &graph) { | |||||
auto parent_node = graph->GetParentNode(); | auto parent_node = graph->GetParentNode(); | ||||
if (parent_node == nullptr) { | 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; | 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, | Status GraphBuilder::Build(ComputeGraphPtr &comp_graph, std::vector<SubGraphInfoPtr> &subgraph_ptr_list, | ||||
GeRootModelPtr &ge_root_model_ptr, uint64_t session_id) { | GeRootModelPtr &ge_root_model_ptr, uint64_t session_id) { | ||||
GELOGI("Start to build model."); | |||||
if (comp_graph == nullptr) { | if (comp_graph == nullptr) { | ||||
GELOGE(GE_GRAPH_PARAM_NULLPTR, "Graph build comp_graph is null."); | GELOGE(GE_GRAPH_PARAM_NULLPTR, "Graph build comp_graph is null."); | ||||
return GE_GRAPH_PARAM_NULLPTR; | 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), | GE_CHK_STATUS_RET(builder.SaveDataToModel(*model_ptr, *ge_model_ptr), | ||||
"Graph[%s] builder SaveDataToModel() return fail.", comp_graph->GetName().c_str()); | "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"); | GE_TIMESTAMP_END(BuildSubgraph, "GraphBuilder::Build"); | ||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -306,7 +303,7 @@ Status GraphBuilder::BuildForUnknownShapeGraph(ComputeGraphPtr &comp_graph, GeMo | |||||
} | } | ||||
GE_CHK_STATUS_RET(builder.SaveDataToModel(*model_ptr, *ge_model_ptr), | GE_CHK_STATUS_RET(builder.SaveDataToModel(*model_ptr, *ge_model_ptr), | ||||
"Graph[%s] builder SaveDataToModel() return fail.", comp_graph->GetName().c_str()); | "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; | 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) { | Status GraphBuilder::SecondPartition(ge::ComputeGraphPtr &comp_graph, vector<ge::SubGraphInfoPtr> &subgraph_ptr_list) { | ||||
GELOGI("[SecondPartition] second partition."); | |||||
GE_TIMESTAMP_START(GraphPartition2); | GE_TIMESTAMP_START(GraphPartition2); | ||||
auto ret = graph_partitioner_.Partition(comp_graph, GraphPartitioner::kSecondPartitioning); | auto ret = graph_partitioner_.Partition(comp_graph, GraphPartitioner::kSecondPartitioning); | ||||
if (ret != SUCCESS) { | if (ret != SUCCESS) { | ||||
@@ -33,7 +33,7 @@ Status LabelAllocator::AssignFunctionalLabels() { | |||||
} | } | ||||
// Add label task for sub graph. | // 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; | std::set<NodePtr> functional_nodes; | ||||
for (auto graph : compute_graph_->GetAllSubgraphs()) { | for (auto graph : compute_graph_->GetAllSubgraphs()) { | ||||
if (!CollectFunctionalNode(graph, functional_nodes)) { | if (!CollectFunctionalNode(graph, functional_nodes)) { | ||||
@@ -597,10 +597,10 @@ Status LogicalStreamAllocator::DoAssign(const ComputeGraphPtr &graph, const Grap | |||||
return status; | 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) { | for (const auto &subgraph : subgraphs) { | ||||
if (subgraph != nullptr) { | 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_); | Status status = pass->Run(graph, subgraphs, context_); | ||||
if (status == SUCCESS) { | 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) { | } 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 { | } else { | ||||
GELOGE(status, "Stream pass %s failed.", pass->GetName().c_str()); | GELOGE(status, "Stream pass %s failed.", pass->GetName().c_str()); | ||||
return status; | return status; | ||||
@@ -76,7 +76,7 @@ Status BinaryBlockMemAssigner::GetMemoryRanges(vector<int64_t> &range_ceils) { | |||||
auto range_number = static_cast<size_t>( | auto range_number = static_cast<size_t>( | ||||
ceil(log(all_memory_size.back() / static_cast<double>(all_memory_size.front())) / log(kLogBase))); | ceil(log(all_memory_size.back() / static_cast<double>(all_memory_size.front())) / log(kLogBase))); | ||||
range_number = (range_number == 0) ? 1 : range_number; | 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); | vector<vector<int64_t>> ranges(range_number); | ||||
GE_CHK_BOOL_EXEC((range_number != 0), return PARAM_INVALID, "range_number can't be 0."); | 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()); | 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; | return SUCCESS; | ||||
} | } | ||||
@@ -455,12 +455,11 @@ void BlockMemAssigner::GetOutAndWorkSpaceMem(vector<int64_t> &all_memory_size) { | |||||
GetNodeWorkSpaceSize(n, temp); | GetNodeWorkSpaceSize(n, temp); | ||||
all_memory_size.insert(all_memory_size.end(), temp.begin(), temp.end()); | 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_) { | for (const auto &pair : symbol_size_) { | ||||
all_memory_size.emplace_back(pair.second); | all_memory_size.emplace_back(pair.second); | ||||
} | } | ||||
sort(all_memory_size.begin(), all_memory_size.end()); | 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();) { | for (auto iter = all_memory_size.begin(); iter != all_memory_size.end();) { | ||||
if (*iter == 0) { | 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) { | bool IsDirectOutputNode(const NodePtr &node, int idx) { | ||||
if ((node != nullptr) && (node->GetOpDesc() != nullptr) && (node->GetOpDesc()->GetType() == NETOUTPUT)) { | 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 true; | ||||
} | } | ||||
return false; | return false; | ||||
@@ -1219,7 +1218,7 @@ Status BlockMemAssigner::AssignOutputMemoryWithReuse(const NodePtr &node, vector | |||||
int64_t stream_id = op_desc->GetStreamId(); | int64_t stream_id = op_desc->GetStreamId(); | ||||
vector<int64_t> memorys_type; | vector<int64_t> memorys_type; | ||||
bool has_mem_type_attr = ge::AttrUtils::GetListInt(op_desc, ATTR_NAME_OUTPUT_MEM_TYPE_LIST, 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()); | op_desc->GetOutputsSize(), memorys_type.size()); | ||||
if (has_mem_type_attr && (memorys_type.size() != op_desc->GetOutputsSize())) { | 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]", | 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 BlockMemAssigner::AssignMemoryWithReuse(vector<int64_t> &ranges) { | ||||
(void)ge::GetContext().GetOption(OPTION_EXEC_DISABLE_REUSED_MEMORY, ge_disable_reuse_mem_env_); | (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; | string op_no_reuse_mem_str; | ||||
const char *op_no_reuse_mem = std::getenv(OP_NO_REUSE_MEM); | 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); | 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; | vector<bool> workspace_reuse_flag; | ||||
GE_IF_BOOL_EXEC(!ge::AttrUtils::GetListBool(node_op_desc, kAttrNameWorkspaceReuseFlag, 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())); | 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()); | temp.size(), tvm_workspace_memory_type.size()); | ||||
if (has_tvm_workspace_mem_type_attr && (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); | 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_); | mem_offset_, p2p_mem_offset_); | ||||
} | } | ||||
@@ -117,7 +117,7 @@ Status GraphMemoryAssigner::AssignMemory() { | |||||
return ge::FAILED; | return ge::FAILED; | ||||
} | } | ||||
int64_t var_size_assign = ge::VarManager::Instance(session_id)->GetVarMemSize(RT_MEMORY_HBM) - var_size_before_assign; | 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); | 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(); | mem_offset[RT_MEMORY_HBM] += memory_block->Size(); | ||||
memory_block->SetTailOffset(mem_offset[RT_MEMORY_HBM] - 1); | 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 | // set offset for zero copy nodes | ||||
priority_assigner->SetOpMemOffset(true); | 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]; | 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); | zero_mem_copy_size); | ||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
Status GraphMemoryAssigner::ReAssignContinuousMemory(bool is_loop_graph) { | Status GraphMemoryAssigner::ReAssignContinuousMemory(bool is_loop_graph) { | ||||
GELOGI("Begin to reassign continuous memory"); | |||||
Status ret; | Status ret; | ||||
for (auto &node : compute_graph_->GetAllNodes()) { | for (auto &node : compute_graph_->GetAllNodes()) { | ||||
// Get the continuous input type of the node, default is false | // 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_) { | 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_); | pair.second.mem_offset_); | ||||
} | } | ||||
return ge::SUCCESS; | return ge::SUCCESS; | ||||
@@ -834,7 +832,6 @@ Status GraphMemoryAssigner::ReAssignVirtualNodesMemory(map<string, vector<NodePt | |||||
string max_batch_label; | string max_batch_label; | ||||
GE_CHK_STATUS_RET(GetMaxBatchLabel(mem_reuse_nodes_map, mem_reuse_model, max_batch_label), | GE_CHK_STATUS_RET(GetMaxBatchLabel(mem_reuse_nodes_map, mem_reuse_model, max_batch_label), | ||||
"Get max batch label failed."); | "Get max batch label failed."); | ||||
GELOGI("The batch label of max batch virtual nodes is %s.", max_batch_label.c_str()); | |||||
PrintMemoryOffset(); | PrintMemoryOffset(); | ||||
vector<size_t> nodes_mem_offset_list; | vector<size_t> nodes_mem_offset_list; | ||||
for (auto &i_map : mem_reuse_nodes_map) { | 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)); | 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" : "", | has_mem_type_attr == true ? "Fusion" : "", | ||||
tmp_op_desc->GetName().c_str(), | tmp_op_desc->GetName().c_str(), | ||||
valid_input_index, | valid_input_index, | ||||
@@ -62,9 +62,9 @@ Status HybridMemAssigner::Assign() { | |||||
std::unique_ptr<BlockMemAssigner> priority_assigner; | 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) { | 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); | priority_assigner = std::move(binary_assigner); | ||||
} else { | } else { | ||||
GELOGI("Use max-block memory assigner method"); | 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); | GE_IF_BOOL_EXEC(peer_out_anchor == nullptr, continue); | ||||
const auto &src_node = peer_out_anchor->GetOwnerNode(); | const auto &src_node = peer_out_anchor->GetOwnerNode(); | ||||
if (!NodeUtils::GetConstOpType(src_node, const_type)) { | 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; | continue; | ||||
} | } | ||||
@@ -232,7 +231,6 @@ Status ModelBuilder::AdjustConstWeightSize(const ge::NodePtr &node, size_t &mem_ | |||||
Status ModelBuilder::SetInputOutputDesc() { | Status ModelBuilder::SetInputOutputDesc() { | ||||
Status ret; | Status ret; | ||||
GELOGI("Start to SetInputOutputDesc."); | |||||
for (const ge::NodePtr &n : compute_graph_->GetNodes(compute_graph_->GetGraphUnknownFlag())) { | for (const ge::NodePtr &n : compute_graph_->GetNodes(compute_graph_->GetGraphUnknownFlag())) { | ||||
auto node_op_desc = n->GetOpDesc(); | auto node_op_desc = n->GetOpDesc(); | ||||
@@ -245,7 +243,6 @@ Status ModelBuilder::SetInputOutputDesc() { | |||||
// final graph. | // final graph. | ||||
if ((GetLocalOmgContext().format == domi::DOMI_TENSOR_ND) && (!node_op_desc->HasAttr("_is_single_op")) && | 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))) { | ((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 inputDescsPtr = node_op_desc->GetAllInputsDescPtr(); | ||||
auto outputDescsPtr = node_op_desc->GetAllOutputsDescPtr(); | auto outputDescsPtr = node_op_desc->GetAllOutputsDescPtr(); | ||||
ge::Format format = ge::FORMAT_ND; | ge::Format format = ge::FORMAT_ND; | ||||
@@ -290,7 +287,7 @@ void ModelBuilder::AddNodeInputProperty() { | |||||
vector<int64_t> src_index_list; | vector<int64_t> src_index_list; | ||||
for (const auto &in_data_anchor : node->GetAllInDataAnchors()) { | for (const auto &in_data_anchor : node->GetAllInDataAnchors()) { | ||||
auto peer_out_anchor = in_data_anchor->GetPeerOutAnchor(); | 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_IF_BOOL_EXEC(node_op_desc->HasAttr(MERGE_PRENODE_FLAG), continue); | ||||
ge::NodePtr src_node = peer_out_anchor->GetOwnerNode(); | ge::NodePtr src_node = peer_out_anchor->GetOwnerNode(); | ||||
@@ -347,7 +344,6 @@ void ModelBuilder::AddNodeInputProperty() { | |||||
} | } | ||||
Status ModelBuilder::AdjustInputTensorFlag() { | Status ModelBuilder::AdjustInputTensorFlag() { | ||||
GELOGI("Start to AdjustInputTensorFlag."); | |||||
for (const ge::NodePtr &n : compute_graph_->GetNodes(compute_graph_->GetGraphUnknownFlag())) { | for (const ge::NodePtr &n : compute_graph_->GetNodes(compute_graph_->GetGraphUnknownFlag())) { | ||||
if ((n->GetType() == DATA_TYPE) || (n->GetType() == AIPP_DATA_TYPE)) { | if ((n->GetType() == DATA_TYPE) || (n->GetType() == AIPP_DATA_TYPE)) { | ||||
GELOGD("Data node: %s.", n->GetName().c_str()); | GELOGD("Data node: %s.", n->GetName().c_str()); | ||||
@@ -441,7 +437,6 @@ Status ModelBuilder::BuildModelDef(ge::Model &model) { | |||||
return FAILED); | return FAILED); | ||||
const DumpProperties &dump_properties = PropertiesManager::Instance().GetDumpProperties(session_id_); | const DumpProperties &dump_properties = PropertiesManager::Instance().GetDumpProperties(session_id_); | ||||
bool is_op_debug = dump_properties.IsOpDebugOpen(); | bool is_op_debug = dump_properties.IsOpDebugOpen(); | ||||
GELOGI("Get op debug:%d", is_op_debug); | |||||
if (is_op_debug) { | if (is_op_debug) { | ||||
if (!ge::AttrUtils::SetBool(&model, ATTR_OP_DEBUG_FLAG, is_op_debug)) { | if (!ge::AttrUtils::SetBool(&model, ATTR_OP_DEBUG_FLAG, is_op_debug)) { | ||||
GELOGE(FAILED, "SetBool of ATTR_OP_DEBUG_FLAG failed."); | 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_name_set.insert(tbe_kernel->GetName()); | ||||
tbe_kernel_store_.AddTBEKernel(tbe_kernel); | 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())) { | for (const ge::NodePtr &n : compute_graph_->GetNodes(compute_graph_->GetGraphUnknownFlag())) { | ||||
@@ -678,7 +672,6 @@ Status ModelBuilder::PreBuildModel() { | |||||
GELOGE(FAILED, "Graph_ is not valid."); | GELOGE(FAILED, "Graph_ is not valid."); | ||||
return FAILED; | return FAILED; | ||||
} | } | ||||
GELOGI("BuildModel begin."); | |||||
GE_CHK_STATUS_RET(SetInputOutputDesc(), "SetInputOutputDesc Failed!"); | 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, | Status RunContextUtil::CreateRunContext(Model &model, const ComputeGraphPtr &graph, Buffer &buffer, | ||||
const uint64_t session_id) { | 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 | // check params | ||||
if (graph == nullptr) { | if (graph == nullptr) { | ||||
GELOGE(PARAM_INVALID, "CreateRunContext param graph is null. session_id=%lu", session_id); | 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); | GELOGE(INTERNAL_ERROR, "Get stream_num attr from model_def failed. session_id=%lu", session_id); | ||||
return INTERNAL_ERROR; | return INTERNAL_ERROR; | ||||
} | } | ||||
GELOGI("Stream_num = %u", stream_num); | |||||
GELOGD("Stream_num = %u", stream_num); | |||||
uint32_t event_num = 0; | uint32_t event_num = 0; | ||||
if (!AttrUtils::GetInt(&model, ATTR_MODEL_EVENT_NUM, event_num)) { | 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); | GELOGE(INTERNAL_ERROR, "Get event_num attr from model failed. session_id=%lu", session_id); | ||||
return INTERNAL_ERROR; | return INTERNAL_ERROR; | ||||
} | } | ||||
GELOGI("Event_num = %u", event_num); | |||||
GELOGD("Event_num = %u", event_num); | |||||
uint32_t label_num = 0; | uint32_t label_num = 0; | ||||
if (!AttrUtils::GetInt(&model, ATTR_MODEL_LABEL_NUM, label_num)) { | 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); | GELOGE(INTERNAL_ERROR, "Get label_num attr from model failed. session_id=%lu", session_id); | ||||
return INTERNAL_ERROR; | return INTERNAL_ERROR; | ||||
} | } | ||||
GELOGI("Label_num = %u", label_num); | |||||
GELOGD("Label_num = %u", label_num); | |||||
Status ret = CreateRtModelResources(stream_num, event_num, label_num); | Status ret = CreateRtModelResources(stream_num, event_num, label_num); | ||||
if (ret != SUCCESS) { | if (ret != SUCCESS) { | ||||
@@ -198,11 +198,11 @@ Status RunContextUtil::CreateRunContext(Model &model, const ComputeGraphPtr &gra | |||||
void RunContextUtil::PrintMemInfo() { | void RunContextUtil::PrintMemInfo() { | ||||
for (auto iter : mem_type_to_data_mem_base_) { | 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_) { | 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; | 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) { | 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_CHECK_NOTNULL(whole_graph_); | ||||
GE_DUMP(whole_graph_, "BeforeAssignedLogicalStreams"); | GE_DUMP(whole_graph_, "BeforeAssignedLogicalStreams"); | ||||
@@ -92,15 +91,12 @@ Status StreamAllocator::AssignLogicalStreams(const std::map<std::string, int> &m | |||||
return status; | return status; | ||||
} | } | ||||
GE_DUMP(whole_graph_, "AfterAssignedLogicalStreams"); | GE_DUMP(whole_graph_, "AfterAssignedLogicalStreams"); | ||||
GELOGI("Assign logical streams success."); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
// After allocating the logical stream in the graph, refresh the stream in the | // After allocating the logical stream in the graph, refresh the stream in the | ||||
// graph and insert the synchronization node. | // graph and insert the synchronization node. | ||||
Status StreamAllocator::RefreshRealStream(int64_t &stream_num, int64_t &event_num) { | Status StreamAllocator::RefreshRealStream(int64_t &stream_num, int64_t &event_num) { | ||||
GELOGI("RefreshRealStream start."); | |||||
GE_CHECK_NOTNULL(whole_graph_); | GE_CHECK_NOTNULL(whole_graph_); | ||||
GE_DUMP(whole_graph_, "BeforeRefreshRealStream"); | 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"); | GELOGI("None of nodes need to assign stream, stream num is 0, it will cause error, so change it to 1"); | ||||
stream_num_ = 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_; | stream_num = stream_num_; | ||||
event_num = static_cast<int64_t>(event_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) { | for (const auto &one_pair : after_refresh_stream_nodes) { | ||||
int64_t stream_id = one_pair.first; | 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) { | for (const auto &node : one_pair.second) { | ||||
string send_event_str; | 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."); | GELOGE(FAILED, "Get max stream and task count by rts failed."); | ||||
return 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; | return SUCCESS; | ||||
} | } | ||||
@@ -30,7 +30,7 @@ StreamGraphOptimizer::~StreamGraphOptimizer() {} | |||||
void StreamGraphOptimizer::RefreshNodeId(const ComputeGraphPtr &comp_graph, Graph2SubGraphInfoList &subgraph_map) { | void StreamGraphOptimizer::RefreshNodeId(const ComputeGraphPtr &comp_graph, Graph2SubGraphInfoList &subgraph_map) { | ||||
size_t node_size = comp_graph->GetAllNodesSize(); | 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_pair : subgraph_map) { | ||||
for (const auto &subgraph_info : subgraph_pair.second) { | for (const auto &subgraph_info : subgraph_pair.second) { | ||||
ComputeGraphPtr subgraph = subgraph_info->GetSubGraph(); | ComputeGraphPtr subgraph = subgraph_info->GetSubGraph(); | ||||
@@ -74,8 +74,6 @@ bool StreamGraphOptimizer::IsSameStreamId(const ComputeGraphPtr &comp_graph) { | |||||
Status StreamGraphOptimizer::OptimizeStreamedSubGraph(const ComputeGraphPtr &comp_graph, | Status StreamGraphOptimizer::OptimizeStreamedSubGraph(const ComputeGraphPtr &comp_graph, | ||||
Graph2SubGraphInfoList &subgraph_map, | Graph2SubGraphInfoList &subgraph_map, | ||||
struct RunContext &run_context) { | struct RunContext &run_context) { | ||||
GELOGI("Optimize streamed subgraph start."); | |||||
RefreshNodeId(comp_graph, subgraph_map); | RefreshNodeId(comp_graph, subgraph_map); | ||||
std::shared_ptr<GELib> instance = ge::GELib::GetInstance(); | std::shared_ptr<GELib> instance = ge::GELib::GetInstance(); | ||||
@@ -86,7 +84,7 @@ Status StreamGraphOptimizer::OptimizeStreamedSubGraph(const ComputeGraphPtr &com | |||||
ComputeGraphPtr subgraph = subgraph_info->GetSubGraph(); | ComputeGraphPtr subgraph = subgraph_info->GetSubGraph(); | ||||
GE_CHECK_NOTNULL(subgraph); | 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(); | 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); | subgraph->GetName().c_str(), engine_name.c_str(), graph_optimizers.size(), ret); | ||||
return ret; | return ret; | ||||
} | } | ||||
GELOGI( | |||||
GELOGD( | |||||
"[optimizeStreamedSubGraph]: optimize streamed subgraph success, subgraph: %s, engine_name: %s, graph " | "[optimizeStreamedSubGraph]: optimize streamed subgraph success, subgraph: %s, engine_name: %s, graph " | ||||
"Optimizer num: %zu!", | "Optimizer num: %zu!", | ||||
subgraph->GetName().c_str(), engine_name.c_str(), graph_optimizers.size()); | 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; | return SUCCESS; | ||||
} | } | ||||
} // namespace ge | } // namespace ge |
@@ -68,7 +68,7 @@ TaskGenerator::TaskGenerator(uint8_t *var_mem_base, uint64_t var_mem_size) { | |||||
TaskGenerator::~TaskGenerator() {} | TaskGenerator::~TaskGenerator() {} | ||||
Status TaskGenerator::GetTaskInfo(Model &model, ComputeGraphPtr &graph, uint64_t session_id, RunContext &run_context) { | 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 | // Check params | ||||
if (graph == nullptr) { | if (graph == nullptr) { | ||||
GELOGE(PARAM_INVALID, "GetTaskInfo param graph is null. session_id=%lu", session_id); | 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; | return ret; | ||||
} | } | ||||
GELOGI("Get TaskInfo success. session_id=%lu", session_id); | |||||
GELOGD("Get TaskInfo success. session_id=%lu", session_id); | |||||
return SUCCESS; | 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; | return SUCCESS; | ||||
} | } | ||||
@@ -575,7 +575,7 @@ Status TaskGenerator::MarkFirstAndLastOps(const vector<OpDescPtr> &ops, bool is_ | |||||
continuous_op_lists.back().emplace_back(op_desc); | 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) { | for (const auto &continuous_ops : continuous_op_lists) { | ||||
map<string, std::pair<OpDescPtr, OpDescPtr>> first_and_last_ops; | 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, | Status TaskGenerator::FindProfilingTaskIndex(const ComputeGraphPtr &graph, ProfilingPoint &profiling_point, | ||||
vector<uint32_t> &all_reduce_nodes) const { | vector<uint32_t> &all_reduce_nodes) const { | ||||
GELOGI("Start FindProfilingTaskIndex."); | |||||
GE_CHECK_NOTNULL(graph); | GE_CHECK_NOTNULL(graph); | ||||
const char *profiling_mode = std::getenv(kProfilingMode); | const char *profiling_mode = std::getenv(kProfilingMode); | ||||
bool is_profiling = (profiling_mode != nullptr) || ProfilingManager::Instance().ProfilingOn() || | bool is_profiling = (profiling_mode != nullptr) || ProfilingManager::Instance().ProfilingOn() || | ||||
ProfilingManager::Instance().ProfilingTrainingTraceOn(); | ProfilingManager::Instance().ProfilingTrainingTraceOn(); | ||||
if (!is_profiling) { | if (!is_profiling) { | ||||
GELOGW("Profiling is not open."); | |||||
GELOGD("Profiling is not open."); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -115,7 +115,7 @@ Status GraphExecutor::FreeInOutBuffer() { | |||||
malloc_flag_ = false; | malloc_flag_ = false; | ||||
return SUCCESS; | return SUCCESS; | ||||
} else { | } else { | ||||
GELOGI("[GraphManager] not malloc buffer."); | |||||
GELOGD("[GraphManager] not malloc buffer."); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
} | } | ||||
@@ -286,7 +286,7 @@ Status GraphLoader::ExecuteModel(uint32_t model_id, rtStream_t stream, bool asyn | |||||
return ret; | return ret; | ||||
} | } | ||||
GELOGI("Execute model success, model_id:%u.", model_id); | |||||
GELOGD("Execute model success, model_id:%u.", model_id); | |||||
return SUCCESS; | 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) { | void DataDumper::SaveDumpInput(const std::shared_ptr<Node> &node) { | ||||
GELOGI("Start to save data %s message", node->GetName().c_str()); | |||||
if (node != nullptr) { | if (node != nullptr) { | ||||
auto input_op_desc = node->GetOpDesc(); | auto input_op_desc = node->GetOpDesc(); | ||||
if (input_op_desc == nullptr) { | 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()}}); | {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"); | GELOGW("Get input size failed"); | ||||
return; | 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); | op_desc_info.input_size.emplace_back(input_size); | ||||
} | } | ||||
for (size_t j = 0; j < op->GetOutputsSize(); ++j) { | 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"); | GELOGW("Get input size failed"); | ||||
return; | 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.output_size.emplace_back(output_size); | ||||
} | } | ||||
op_desc_info.input_addrs = ModelUtils::GetInputDataAddrs(model_param, op); | 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) { | if (step_id != 0) { | ||||
GELOGI("step_id exists."); | GELOGI("step_id exists."); | ||||
op_mapping_info.set_step_id_addr(static_cast<uint64_t>(step_id)); | op_mapping_info.set_step_id_addr(static_cast<uint64_t>(step_id)); | ||||
} else { | |||||
GELOGI("step_id is null."); | |||||
} | } | ||||
if (loop_per_iter != 0) { | if (loop_per_iter != 0) { | ||||
GELOGI("loop_per_iter exists."); | GELOGI("loop_per_iter exists."); | ||||
op_mapping_info.set_iterations_per_loop_addr(static_cast<uint64_t>(loop_per_iter)); | 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) { | if (loop_cond != 0) { | ||||
GELOGI("loop_cond exists."); | GELOGI("loop_cond exists."); | ||||
op_mapping_info.set_loop_cond_addr(static_cast<uint64_t>(loop_cond)); | 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); | PrintCheckLog(dump_list_key); | ||||
if (op_list_.empty()) { | if (op_list_.empty()) { | ||||
GELOGW("op_list_ is empty"); | |||||
GELOGD("op_list_ is empty"); | |||||
} | } | ||||
aicpu::dump::OpMappingInfo op_mapping_info; | aicpu::dump::OpMappingInfo op_mapping_info; | ||||
@@ -684,8 +676,6 @@ Status DataDumper::LoadDumpInfo() { | |||||
op_mapping_info.set_flag(kAicpuLoadFlag); | op_mapping_info.set_flag(kAicpuLoadFlag); | ||||
op_mapping_info.set_dump_step(dump_properties_.GetDumpStep()); | op_mapping_info.set_dump_step(dump_properties_.GetDumpStep()); | ||||
SetOpMappingLoopAddr(global_step_, loop_per_iter_, loop_cond_, op_mapping_info); | 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); | auto ret = BuildTaskInfo(op_mapping_info); | ||||
if (ret != SUCCESS) { | if (ret != SUCCESS) { | ||||
GELOGE(ret, "Build task info failed"); | 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() { | Status DataDumper::UnloadDumpInfo() { | ||||
if (!load_flag_) { | if (!load_flag_) { | ||||
GELOGI("No need to UnloadDumpInfo."); | |||||
load_flag_ = false; | load_flag_ = false; | ||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -838,7 +827,6 @@ Status DataDumper::UnloadDumpInfo() { | |||||
void DataDumper::PrintCheckLog(string &dump_list_key) { | void DataDumper::PrintCheckLog(string &dump_list_key) { | ||||
std::set<std::string> model_list = dump_properties_.GetAllDumpModel(); | std::set<std::string> model_list = dump_properties_.GetAllDumpModel(); | ||||
if (model_list.empty()) { | if (model_list.empty()) { | ||||
GELOGI("No model need dump."); | |||||
return; | return; | ||||
} | } | ||||
@@ -202,7 +202,6 @@ DavinciModel::~DavinciModel() { | |||||
OpDebugUnRegister(); | OpDebugUnRegister(); | ||||
GELOGI("do ReleaseTask"); | |||||
ReleaseTask(); | ReleaseTask(); | ||||
CleanTbeHandle(); | CleanTbeHandle(); | ||||
@@ -333,7 +332,6 @@ Status DavinciModel::InitModelMem(void *dev_ptr, size_t mem_size, void *weight_p | |||||
GELOGI("[IMAS]InitModelMem graph_%u MallocMemory type[W] memaddr[%p] mem_size[%zu]", runtime_param_.graph_id, | GELOGI("[IMAS]InitModelMem graph_%u MallocMemory type[W] memaddr[%p] mem_size[%zu]", runtime_param_.graph_id, | ||||
weights_mem_base_, weights_size); | weights_mem_base_, weights_size); | ||||
GE_CHK_RT_RET(rtMemcpy(weights_mem_base_, weights_size, weights.GetData(), weights_size, RT_MEMCPY_HOST_TO_DEVICE)); | GE_CHK_RT_RET(rtMemcpy(weights_mem_base_, weights_size, weights.GetData(), weights_size, RT_MEMCPY_HOST_TO_DEVICE)); | ||||
GELOGI("copy weights data to device"); | |||||
} | } | ||||
GE_CHK_STATUS_RET(InitVariableMem(), "Init variable memory failed."); | GE_CHK_STATUS_RET(InitVariableMem(), "Init variable memory failed."); | ||||
@@ -484,7 +482,7 @@ Status DavinciModel::SetTSDevice() { | |||||
int64_t value = 0; | int64_t value = 0; | ||||
bool ret = ge::AttrUtils::GetInt(ge_model_, ATTR_MODEL_CORE_TYPE, value); | bool ret = ge::AttrUtils::GetInt(ge_model_, ATTR_MODEL_CORE_TYPE, value); | ||||
uint32_t core_type = ret ? static_cast<uint32_t>(value) : 0; | uint32_t core_type = ret ? static_cast<uint32_t>(value) : 0; | ||||
GELOGI("SetTSDevice: %u", core_type); | |||||
GELOGD("SetTSDevice: %u", core_type); | |||||
rtError_t rt_ret = rtSetTSDevice(core_type); | rtError_t rt_ret = rtSetTSDevice(core_type); | ||||
if (rt_ret != RT_ERROR_NONE) { | if (rt_ret != RT_ERROR_NONE) { | ||||
GELOGE(RT_FAILED, "SetTSDevice failed, ret: 0x%X", rt_ret); | GELOGE(RT_FAILED, "SetTSDevice failed, ret: 0x%X", rt_ret); | ||||
@@ -539,7 +537,6 @@ Status DavinciModel::OpDebugRegister() { | |||||
} | } | ||||
void DavinciModel::OpDebugUnRegister() { | void DavinciModel::OpDebugUnRegister() { | ||||
GELOGI("OpDebugUnRegister, is_op_debug_reg_ = %d", is_op_debug_reg_); | |||||
if (is_op_debug_reg_) { | if (is_op_debug_reg_) { | ||||
debug_reg_mutex_.unlock(); | debug_reg_mutex_.unlock(); | ||||
rtError_t rt_ret = RT_ERROR_NONE; | rtError_t rt_ret = RT_ERROR_NONE; | ||||
@@ -644,7 +641,7 @@ Status DavinciModel::Init(void *dev_ptr, size_t mem_size, void *weight_ptr, size | |||||
GE_CHK_STATUS_RET(TransVarDataUtils::CopyVarData(compute_graph, session_id_, device_id_), "copy var data failed."); | GE_CHK_STATUS_RET(TransVarDataUtils::CopyVarData(compute_graph, session_id_, device_id_), "copy var data failed."); | ||||
GE_TIMESTAMP_START(InitModelMem); | GE_TIMESTAMP_START(InitModelMem); | ||||
GELOGI("Known node is %d", known_node_); | |||||
GELOGD("Known node is %d", known_node_); | |||||
if (!known_node_) { | if (!known_node_) { | ||||
GE_CHK_STATUS_RET_NOLOG(InitModelMem(dev_ptr, mem_size, weight_ptr, weight_size)); | GE_CHK_STATUS_RET_NOLOG(InitModelMem(dev_ptr, mem_size, weight_ptr, weight_size)); | ||||
data_inputer_ = new (std::nothrow) DataInputer(); | data_inputer_ = new (std::nothrow) DataInputer(); | ||||
@@ -704,7 +701,6 @@ Status DavinciModel::Init(void *dev_ptr, size_t mem_size, void *weight_ptr, size | |||||
} | } | ||||
Shrink(); | Shrink(); | ||||
GELOGI("Davinci model init success."); | |||||
return ret; | return ret; | ||||
} | } | ||||
@@ -972,7 +968,7 @@ Status DavinciModel::InitDataOp(const NodePtr &node, uint32_t &data_op_index, ma | |||||
} | } | ||||
auto data_index = data_op_index; | auto data_index = data_op_index; | ||||
if (AttrUtils::GetInt(op_desc, ATTR_NAME_INDEX, data_index)) { | if (AttrUtils::GetInt(op_desc, ATTR_NAME_INDEX, data_index)) { | ||||
GELOGI("ge_train: get new index %u, old %u", data_index, data_op_index); | |||||
GELOGD("ge_train: get new index %u, old %u", data_index, data_op_index); | |||||
} | } | ||||
bool fusion_flag = false; | bool fusion_flag = false; | ||||
ZeroCopyOffset zero_copy_offset; | ZeroCopyOffset zero_copy_offset; | ||||
@@ -995,7 +991,6 @@ Status DavinciModel::InitDataOp(const NodePtr &node, uint32_t &data_op_index, ma | |||||
new_input_outside_addrs_[addr] = zero_copy_offset; | new_input_outside_addrs_[addr] = zero_copy_offset; | ||||
} | } | ||||
GELOGI("SetInputOutsideAddr success."); | |||||
data_op_index++; | data_op_index++; | ||||
if (InitInputZeroCopyNodes(node) != SUCCESS) { | if (InitInputZeroCopyNodes(node) != SUCCESS) { | ||||
GELOGE(PARAM_INVALID, "Input zero copy nodes init failed!"); | GELOGE(PARAM_INVALID, "Input zero copy nodes init failed!"); | ||||
@@ -1130,7 +1125,6 @@ Status DavinciModel::InitNetOutput(const NodePtr &node) { | |||||
DisableZeroCopy(real_addr); | DisableZeroCopy(real_addr); | ||||
real_virtual_addrs_.insert(real_addr); | real_virtual_addrs_.insert(real_addr); | ||||
} | } | ||||
GELOGI("SetOutputOutsideAddr success."); | |||||
} | } | ||||
GE_IF_BOOL_EXEC(InitOutputZeroCopyNodes(node) != SUCCESS, | GE_IF_BOOL_EXEC(InitOutputZeroCopyNodes(node) != SUCCESS, | ||||
@@ -1146,8 +1140,6 @@ Status DavinciModel::InitNetOutput(const NodePtr &node) { | |||||
GE_IF_BOOL_EXEC(GetGearAndRealOutShapeInfo(input_count, op_desc) != SUCCESS, | GE_IF_BOOL_EXEC(GetGearAndRealOutShapeInfo(input_count, op_desc) != SUCCESS, | ||||
GELOGE(PARAM_INVALID, "Failed to get gear and real out shape info."); return PARAM_INVALID;); | GELOGE(PARAM_INVALID, "Failed to get gear and real out shape info."); return PARAM_INVALID;); | ||||
} | } | ||||
GELOGI("DavinciModel::InitNetoutput success."); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -1967,7 +1959,6 @@ void DavinciModel::GetModelAttr(std::vector<std::string> &dynamic_output_shape_i | |||||
if (op->GetType() != NETOUTPUT) { | if (op->GetType() != NETOUTPUT) { | ||||
continue; | continue; | ||||
} | } | ||||
GELOGI("Start to get dynamic output dims attr"); | |||||
if (!AttrUtils::GetListStr(op, ATTR_NAME_DYNAMIC_OUTPUT_DIMS, dynamic_output_shape_info)) { | if (!AttrUtils::GetListStr(op, ATTR_NAME_DYNAMIC_OUTPUT_DIMS, dynamic_output_shape_info)) { | ||||
GELOGD("Can not get dynamic output dims attr"); | GELOGD("Can not get dynamic output dims attr"); | ||||
} | } | ||||
@@ -2123,7 +2114,7 @@ void DavinciModel::CreateOutput(uint32_t index, OpDescPtr &op_desc, InputOutputD | |||||
} | } | ||||
Status DavinciModel::GetOutputDescInfo(vector<InputOutputDescInfo> &output_desc, std::vector<uint32_t> &formats) { | Status DavinciModel::GetOutputDescInfo(vector<InputOutputDescInfo> &output_desc, std::vector<uint32_t> &formats) { | ||||
GELOGI("Output node size: %zu", output_op_list_.size()); | |||||
GELOGD("Output node size: %zu", output_op_list_.size()); | |||||
for (size_t i = 0; i < output_op_list_.size(); i++) { | for (size_t i = 0; i < output_op_list_.size(); i++) { | ||||
auto &op_desc = output_op_list_[i]; | auto &op_desc = output_op_list_[i]; | ||||
uint32_t out_size = static_cast<uint32_t>(op_desc->GetInputsSize()); | uint32_t out_size = static_cast<uint32_t>(op_desc->GetInputsSize()); | ||||
@@ -2234,8 +2225,6 @@ Status DavinciModel::SinkModelProfile() { | |||||
Msprof::Engine::Reporter *reporter = PluginImpl::GetPluginReporter(); | Msprof::Engine::Reporter *reporter = PluginImpl::GetPluginReporter(); | ||||
GE_IF_BOOL_EXEC(reporter == nullptr, GELOGI("Profiling report is nullptr!"); return SUCCESS); | GE_IF_BOOL_EXEC(reporter == nullptr, GELOGI("Profiling report is nullptr!"); return SUCCESS); | ||||
GELOGI("Start collect model load profiling data."); | |||||
Msprof::Engine::ReporterData reporter_data{}; | Msprof::Engine::ReporterData reporter_data{}; | ||||
// report model data tag name | // report model data tag name | ||||
std::string tag_name; | std::string tag_name; | ||||
@@ -2293,7 +2282,6 @@ Status DavinciModel::SinkModelProfile() { | |||||
uint32_t op_num = fusion_op_info->original_op_names.size(); | uint32_t op_num = fusion_op_info->original_op_names.size(); | ||||
uint32_t task_id = task->GetTaskID(); | uint32_t task_id = task->GetTaskID(); | ||||
if (op_num > 0) { | if (op_num > 0) { | ||||
GELOGI("task.id = %u, opNum = %u", task_id, op_num); | |||||
op_id_map.insert(std::make_pair(fusion_op_info->op_index, task_id)); | op_id_map.insert(std::make_pair(fusion_op_info->op_index, task_id)); | ||||
} | } | ||||
} | } | ||||
@@ -3155,7 +3143,6 @@ Status DavinciModel::DistributeTask() { | |||||
} | } | ||||
const auto &model_task_def = ge_model_->GetModelTaskDefPtr(); | const auto &model_task_def = ge_model_->GetModelTaskDefPtr(); | ||||
GELOGI("there are %zu task need to save.", task_list_.size()); | |||||
for (size_t task_index = 0; task_index < task_list_.size(); ++task_index) { | for (size_t task_index = 0; task_index < task_list_.size(); ++task_index) { | ||||
auto &task = task_list_.at(task_index); | auto &task = task_list_.at(task_index); | ||||
GE_CHK_STATUS_RET(task->Distribute(), "Task[%zu] distribute fail", task_index); | GE_CHK_STATUS_RET(task->Distribute(), "Task[%zu] distribute fail", task_index); | ||||
@@ -3588,12 +3575,12 @@ Status DavinciModel::InitTbeHandle(const OpDescPtr &op_desc) { | |||||
if (rtQueryFunctionRegistered(bin_file_key) != RT_ERROR_NONE) { | if (rtQueryFunctionRegistered(bin_file_key) != RT_ERROR_NONE) { | ||||
void *bin_handle = nullptr; | void *bin_handle = nullptr; | ||||
if (!kernel_store.FindTBEHandle(bin_file_key, bin_handle)) { | if (!kernel_store.FindTBEHandle(bin_file_key, bin_handle)) { | ||||
GELOGI("TBE: can't find the kernel_name[%s] in HandleMap", bin_file_key); | |||||
GELOGD("TBE: can't find the kernel_name[%s] in HandleMap", bin_file_key); | |||||
rtDevBinary_t binary; | rtDevBinary_t binary; | ||||
std::string json_string; | std::string json_string; | ||||
GE_IF_BOOL_EXEC(AttrUtils::GetStr(op_desc, TVM_ATTR_NAME_MAGIC, json_string), | GE_IF_BOOL_EXEC(AttrUtils::GetStr(op_desc, TVM_ATTR_NAME_MAGIC, json_string), | ||||
GELOGI("Get original type of session_graph_id.")); | |||||
GELOGD("Get original type of session_graph_id.")); | |||||
if (json_string == "RT_DEV_BINARY_MAGIC_ELF_AICPU") { | if (json_string == "RT_DEV_BINARY_MAGIC_ELF_AICPU") { | ||||
binary.magic = RT_DEV_BINARY_MAGIC_ELF_AICPU; | binary.magic = RT_DEV_BINARY_MAGIC_ELF_AICPU; | ||||
} else if (json_string == "RT_DEV_BINARY_MAGIC_ELF") { | } else if (json_string == "RT_DEV_BINARY_MAGIC_ELF") { | ||||
@@ -3609,13 +3596,13 @@ Status DavinciModel::InitTbeHandle(const OpDescPtr &op_desc) { | |||||
binary.data = tbe_kernel->GetBinData(); | binary.data = tbe_kernel->GetBinData(); | ||||
binary.length = tbe_kernel->GetBinDataSize(); | binary.length = tbe_kernel->GetBinDataSize(); | ||||
GELOGI("TBE: binary.length: %lu", binary.length); | |||||
GELOGD("TBE: binary.length: %lu", binary.length); | |||||
GE_CHK_RT_RET(rtDevBinaryRegister(&binary, &bin_handle)); | GE_CHK_RT_RET(rtDevBinaryRegister(&binary, &bin_handle)); | ||||
std::string meta_data; | std::string meta_data; | ||||
GE_IF_BOOL_EXEC(AttrUtils::GetStr(op_desc, TVM_ATTR_NAME_METADATA, meta_data), | GE_IF_BOOL_EXEC(AttrUtils::GetStr(op_desc, TVM_ATTR_NAME_METADATA, meta_data), | ||||
GELOGI("Get original type of json_string")); | GELOGI("Get original type of json_string")); | ||||
GELOGI("TBE: meta data: %s", meta_data.empty() ? "null" : meta_data.c_str()); | |||||
GELOGD("TBE: meta data: %s", meta_data.empty() ? "null" : meta_data.c_str()); | |||||
GE_IF_BOOL_EXEC(!meta_data.empty(), GE_CHK_RT_RET(rtMetadataRegister(bin_handle, meta_data.c_str()))); | GE_IF_BOOL_EXEC(!meta_data.empty(), GE_CHK_RT_RET(rtMetadataRegister(bin_handle, meta_data.c_str()))); | ||||
kernel_store.StoreTBEHandle(bin_file_key, bin_handle, tbe_kernel); | kernel_store.StoreTBEHandle(bin_file_key, bin_handle, tbe_kernel); | ||||
@@ -3626,8 +3613,7 @@ Status DavinciModel::InitTbeHandle(const OpDescPtr &op_desc) { | |||||
std::string kernel_name; | std::string kernel_name; | ||||
GE_IF_BOOL_EXEC(AttrUtils::GetStr(op_desc, op_desc->GetName() + "_kernelname", kernel_name), | GE_IF_BOOL_EXEC(AttrUtils::GetStr(op_desc, op_desc->GetName() + "_kernelname", kernel_name), | ||||
GELOGI("Get original type of kernel_name")); | |||||
GELOGI("TBE: binfile_key=%s, kernel_name=%s", bin_file_key, kernel_name.c_str()); | |||||
GELOGD("Get original type of kernel_name")); | |||||
GE_CHK_RT_RET(rtFunctionRegister(bin_handle, bin_file_key, bin_file_key, kernel_name.c_str(), 0)); | GE_CHK_RT_RET(rtFunctionRegister(bin_handle, bin_file_key, bin_file_key, kernel_name.c_str(), 0)); | ||||
used_tbe_handle_map_[bin_file_key] = 1; // Init used num to 1. | used_tbe_handle_map_[bin_file_key] = 1; // Init used num to 1. | ||||
return SUCCESS; | return SUCCESS; | ||||
@@ -3822,7 +3808,7 @@ Status DavinciModel::InitModelStream(rtStream_t stream) { | |||||
Status DavinciModel::NnExecute(rtStream_t stream, bool async_mode, const InputData &input_data, | Status DavinciModel::NnExecute(rtStream_t stream, bool async_mode, const InputData &input_data, | ||||
OutputData &output_data) { | OutputData &output_data) { | ||||
is_async_mode_ = async_mode; | is_async_mode_ = async_mode; | ||||
GELOGI("Model Run begin, model id:%u, data index:%u, flag:%d.", model_id_, input_data.index, is_async_mode_); | |||||
GELOGD("Model Run begin, model id:%u, data index:%u, flag:%d.", model_id_, input_data.index, is_async_mode_); | |||||
GE_CHK_STATUS_RET(InitModelStream(stream), "Init model stream failed."); | GE_CHK_STATUS_RET(InitModelStream(stream), "Init model stream failed."); | ||||
is_dynamic_ = input_data.is_dynamic_batch; | is_dynamic_ = input_data.is_dynamic_batch; | ||||
if (!is_dynamic_) { | if (!is_dynamic_) { | ||||
@@ -3834,7 +3820,7 @@ Status DavinciModel::NnExecute(rtStream_t stream, bool async_mode, const InputDa | |||||
GE_CHK_BOOL_TRUE_EXEC_WITH_LOG(ret != SUCCESS, return ret, "Copy input data to model failed. model id: %u", | GE_CHK_BOOL_TRUE_EXEC_WITH_LOG(ret != SUCCESS, return ret, "Copy input data to model failed. model id: %u", | ||||
model_id_); | model_id_); | ||||
GELOGI("current_data.index=%u", input_data.index); | |||||
GELOGD("current_data.index=%u", input_data.index); | |||||
GE_IF_BOOL_EXEC(ProfilingManager::Instance().ProfilingModelExecuteOn(), SetProfileTime(MODEL_PRE_PROC_END)); | GE_IF_BOOL_EXEC(ProfilingManager::Instance().ProfilingModelExecuteOn(), SetProfileTime(MODEL_PRE_PROC_END)); | ||||
if (!task_list_.empty()) { | if (!task_list_.empty()) { | ||||
@@ -3843,7 +3829,7 @@ Status DavinciModel::NnExecute(rtStream_t stream, bool async_mode, const InputDa | |||||
rtError_t rt_ret = rtModelExecute(rt_model_handle_, rt_model_stream_, 0); | rtError_t rt_ret = rtModelExecute(rt_model_handle_, rt_model_stream_, 0); | ||||
GE_CHK_RT_EXEC(rt_ret, return RT_ERROR_TO_GE_STATUS(rt_ret)); | GE_CHK_RT_EXEC(rt_ret, return RT_ERROR_TO_GE_STATUS(rt_ret)); | ||||
GE_IF_BOOL_EXEC(ProfilingManager::Instance().ProfilingModelExecuteOn(), SetProfileTime(MODEL_INFER_END)); | GE_IF_BOOL_EXEC(ProfilingManager::Instance().ProfilingModelExecuteOn(), SetProfileTime(MODEL_INFER_END)); | ||||
GELOGI("rtModelExecute end"); | |||||
GELOGD("rtModelExecute end"); | |||||
} | } | ||||
if (!is_async_mode_) { | if (!is_async_mode_) { | ||||
@@ -3855,7 +3841,7 @@ Status DavinciModel::NnExecute(rtStream_t stream, bool async_mode, const InputDa | |||||
// report model time data | // report model time data | ||||
GE_IF_BOOL_EXEC(ProfilingManager::Instance().ProfilingModelExecuteOn(), (void)SinkTimeProfile(input_data)); | GE_IF_BOOL_EXEC(ProfilingManager::Instance().ProfilingModelExecuteOn(), (void)SinkTimeProfile(input_data)); | ||||
GELOGI("Model run end, model id:%u", model_id_); | |||||
GELOGD("Model run end, model id:%u", model_id_); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -4009,7 +3995,6 @@ void DavinciModel::FreeWeightsMem() { | |||||
} | } | ||||
Status DavinciModel::TransAllVarData(ComputeGraphPtr &graph, uint32_t graph_id) { | Status DavinciModel::TransAllVarData(ComputeGraphPtr &graph, uint32_t graph_id) { | ||||
GELOGI("TransAllVarData start: session_id:%lu, graph_id: %u.", session_id_, graph_id); | |||||
rtContext_t ctx = nullptr; | rtContext_t ctx = nullptr; | ||||
rtError_t rt_ret = rtCtxGetCurrent(&ctx); | rtError_t rt_ret = rtCtxGetCurrent(&ctx); | ||||
if (rt_ret != RT_ERROR_NONE) { | if (rt_ret != RT_ERROR_NONE) { | ||||
@@ -4030,13 +4015,10 @@ Status DavinciModel::TransAllVarData(ComputeGraphPtr &graph, uint32_t graph_id) | |||||
GE_CHK_STATUS_RET_NOLOG( | GE_CHK_STATUS_RET_NOLOG( | ||||
TransVarDataUtils::TransAllVarData(variable_node_list, session_id_, ctx, graph_id, kThreadNum)); | TransVarDataUtils::TransAllVarData(variable_node_list, session_id_, ctx, graph_id, kThreadNum)); | ||||
GELOGI("TransAllVarData success."); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
void DavinciModel::SetDataDumperArgs(const ComputeGraphPtr &compute_graph) { | void DavinciModel::SetDataDumperArgs(const ComputeGraphPtr &compute_graph) { | ||||
GELOGI("set data dumper args, name: %s, id: %u.", name_.c_str(), model_id_); | |||||
data_dumper_.SetModelName(name_); | data_dumper_.SetModelName(name_); | ||||
data_dumper_.SetModelId(model_id_); | data_dumper_.SetModelId(model_id_); | ||||
data_dumper_.SetOmName(om_name_); | data_dumper_.SetOmName(om_name_); | ||||
@@ -4062,15 +4044,13 @@ void DavinciModel::SetDataDumperArgs(const ComputeGraphPtr &compute_graph) { | |||||
} | } | ||||
return v_output_addr[0]; | return v_output_addr[0]; | ||||
} | } | ||||
GELOGW("op is null."); | |||||
GELOGD("op is null."); | |||||
return nullptr; | return nullptr; | ||||
}; | }; | ||||
data_dumper_.SetLoopAddr(get_var_addr(GetVariableOp(NODE_NAME_GLOBAL_STEP), runtime_param_), | data_dumper_.SetLoopAddr(get_var_addr(GetVariableOp(NODE_NAME_GLOBAL_STEP), runtime_param_), | ||||
get_var_addr(GetVariableOp(NODE_NAME_FLOWCTRL_LOOP_PER_ITER), runtime_param_), | get_var_addr(GetVariableOp(NODE_NAME_FLOWCTRL_LOOP_PER_ITER), runtime_param_), | ||||
get_var_addr(GetVariableOp(NODE_NAME_FLOWCTRL_LOOP_COND), runtime_param_)); | get_var_addr(GetVariableOp(NODE_NAME_FLOWCTRL_LOOP_COND), runtime_param_)); | ||||
GELOGI("SetDataDumperArgs end."); | |||||
} | } | ||||
uint32_t DavinciModel::GetFlowctrlIndex(uint32_t op_index) { | uint32_t DavinciModel::GetFlowctrlIndex(uint32_t op_index) { | ||||
@@ -4089,7 +4069,6 @@ void DavinciModel::SaveHcclFollowStream(int64_t main_stream_id, rtStream_t strea | |||||
} | } | ||||
Status DavinciModel::GetComputeGraphInfo(vector<ComputeGraphDescInfo> &graph_desc_info) { | Status DavinciModel::GetComputeGraphInfo(vector<ComputeGraphDescInfo> &graph_desc_info) { | ||||
GELOGI("GetComputeGraphInfo start."); | |||||
auto &all_op_desc = data_dumper_.GetAllOpDescInfo(); | auto &all_op_desc = data_dumper_.GetAllOpDescInfo(); | ||||
for (auto &op_desc : all_op_desc) { | for (auto &op_desc : all_op_desc) { | ||||
ComputeGraphDescInfo compute_graph_info; | ComputeGraphDescInfo compute_graph_info; | ||||
@@ -4109,7 +4088,6 @@ Status DavinciModel::GetComputeGraphInfo(vector<ComputeGraphDescInfo> &graph_des | |||||
graph_desc_info.emplace_back(compute_graph_info); | graph_desc_info.emplace_back(compute_graph_info); | ||||
} | } | ||||
GELOGI("GetComputeGraphInfo end."); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -202,7 +202,6 @@ void ModelManager::DestroyAicpuSession(uint64_t session_id) { | |||||
} | } | ||||
ge::Status ModelManager::DestroyAicpuSessionForInfer(uint32_t model_id) { | ge::Status ModelManager::DestroyAicpuSessionForInfer(uint32_t model_id) { | ||||
GELOGI("Destroy aicpu session for infer, model id is %u.", model_id); | |||||
std::lock_guard<std::mutex> lock(map_mutex_); | std::lock_guard<std::mutex> lock(map_mutex_); | ||||
auto it = model_map_.find(model_id); | auto it = model_map_.find(model_id); | ||||
if (it == model_map_.end()) { | if (it == model_map_.end()) { | ||||
@@ -210,7 +209,6 @@ ge::Status ModelManager::DestroyAicpuSessionForInfer(uint32_t model_id) { | |||||
return GE_EXEC_MODEL_ID_INVALID; | return GE_EXEC_MODEL_ID_INVALID; | ||||
} | } | ||||
uint64_t session_id = it->second->GetSessionId(); | uint64_t session_id = it->second->GetSessionId(); | ||||
GELOGI("Destroy aicpu session for infer, session id is %lu.", session_id); | |||||
DestroyAicpuSession(session_id); | DestroyAicpuSession(session_id); | ||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -1213,7 +1211,7 @@ Status ModelManager::ExecuteModel(uint32_t model_id, rtStream_t stream, bool asy | |||||
Status status = davinci_model->NnExecute(stream, async_mode, input_data, output_data); | Status status = davinci_model->NnExecute(stream, async_mode, input_data, output_data); | ||||
if (status == SUCCESS) { | if (status == SUCCESS) { | ||||
GELOGI("Execute model %u success.", model_id); | |||||
GELOGD("Execute model %u success.", model_id); | |||||
} | } | ||||
return status; | return status; | ||||
@@ -1270,7 +1268,6 @@ Status ModelManager::LoadCustAicpuSo(const OpDescPtr &op_desc, const string &so_ | |||||
} | } | ||||
Status ModelManager::LaunchKernelCustAicpuSo(const string &kernel_name) { | Status ModelManager::LaunchKernelCustAicpuSo(const string &kernel_name) { | ||||
GELOGI("LaunchCustAucpuSo in, kernel name %s", kernel_name.c_str()); | |||||
std::lock_guard<std::mutex> lock(cust_aicpu_mutex_); | std::lock_guard<std::mutex> lock(cust_aicpu_mutex_); | ||||
if (cust_aicpu_so_.size() == 0) return SUCCESS; | if (cust_aicpu_so_.size() == 0) return SUCCESS; | ||||
// get current context | // get current context | ||||
@@ -337,9 +337,7 @@ vector<void *> ModelUtils::GetInputDataAddrs(const RuntimeParam &model_param, Co | |||||
continue; | continue; | ||||
} | } | ||||
GE_IF_BOOL_EXEC(non_const_index >= v_input_offset.size(), | |||||
GELOGW("offsets=%zu, inputs=%zu, index=%zu.", v_input_offset.size(), inputs_size, non_const_index); | |||||
break); | |||||
GE_IF_BOOL_EXEC(non_const_index >= v_input_offset.size(), break); | |||||
int64_t input_offset = v_input_offset[non_const_index]; | int64_t input_offset = v_input_offset[non_const_index]; | ||||
non_const_index++; | non_const_index++; | ||||
@@ -178,7 +178,7 @@ void KernelTaskInfo::UpdateTaskId() { | |||||
} | } | ||||
task_id_ = task_id; | task_id_ = task_id; | ||||
stream_id_ = stream_id; | stream_id_ = stream_id; | ||||
GELOGI("UpdateTaskId:UpdateTaskId [%u], stream id [%u]:", task_id, stream_id); | |||||
GELOGD("UpdateTaskId:UpdateTaskId [%u], stream id [%u]:", task_id, stream_id); | |||||
} | } | ||||
} | } | ||||
@@ -382,7 +382,7 @@ Status KernelTaskInfo::Distribute() { | |||||
call_save_dump_ = true; | call_save_dump_ = true; | ||||
} else { | } else { | ||||
/* default: not skt launch */ | /* default: not skt launch */ | ||||
GELOGI( | |||||
GELOGD( | |||||
"KernelTaskInfo Distribute Start, sktenable:%d taskid:%u sktid:%u last_sktid:%u stubfunc_name:%s " | "KernelTaskInfo Distribute Start, sktenable:%d taskid:%u sktid:%u last_sktid:%u stubfunc_name:%s " | ||||
"stubfunc:%p blockdim:%u stream:%p", | "stubfunc:%p blockdim:%u stream:%p", | ||||
call_skt, task_id_, skt_id_, skt_info_.last_task_id, stub_func_name_.c_str(), stub_func_, block_dim_, stream_); | call_skt, task_id_, skt_id_, skt_info_.last_task_id, stub_func_name_.c_str(), stub_func_, block_dim_, stream_); | ||||
@@ -409,7 +409,7 @@ Status KernelTaskInfo::Distribute() { | |||||
} | } | ||||
// set for task_id_ | // set for task_id_ | ||||
UpdateTaskId(); | UpdateTaskId(); | ||||
GELOGI( | |||||
GELOGD( | |||||
"KernelTaskInfo Distribute Success. sktenable:%d taskid:%d sktid:%d stubfunc_name:%s stubfunc:%p " | "KernelTaskInfo Distribute Success. sktenable:%d taskid:%d sktid:%d stubfunc_name:%s stubfunc:%p " | ||||
"blockdim:%d stream:%p", | "blockdim:%d stream:%p", | ||||
call_skt, task_id_, skt_id_, stub_func_name_.c_str(), stub_func_, block_dim_, stream_); | call_skt, task_id_, skt_id_, stub_func_name_.c_str(), stub_func_, block_dim_, stream_); | ||||
@@ -39,20 +39,18 @@ Status ZeroCopyOffset::InitInputDataInfo(int64_t output_size, void *virtual_addr | |||||
(void)ge::AttrUtils::GetListInt(op_desc, ATTR_ZERO_COPY_RELATIVE_OFFSET, zero_copy_relative_offset_); | (void)ge::AttrUtils::GetListInt(op_desc, ATTR_ZERO_COPY_RELATIVE_OFFSET, zero_copy_relative_offset_); | ||||
GE_CHK_BOOL_EXEC(zero_copy_basic_offset_.size() == zero_copy_relative_offset_.size(), return PARAM_INVALID, | GE_CHK_BOOL_EXEC(zero_copy_basic_offset_.size() == zero_copy_relative_offset_.size(), return PARAM_INVALID, | ||||
"basic_offset_size should be equal to relative_offset_size"); | "basic_offset_size should be equal to relative_offset_size"); | ||||
GELOGI("[ZCPY] zero_copy_basic_offset size is %zu", zero_copy_basic_offset_.size()); | |||||
GELOGD("[ZCPY] zero_copy_basic_offset size is %zu", zero_copy_basic_offset_.size()); | |||||
int64_t virtual_addr_offset = op_desc->GetOutputOffset().at(kDataIndex); | int64_t virtual_addr_offset = op_desc->GetOutputOffset().at(kDataIndex); | ||||
GELOGI("virtual_addr_offset is %ld.", virtual_addr_offset); | |||||
IsL2Fusion(zero_copy_basic_offset_, virtual_addr_offset, fusion_flag); | IsL2Fusion(zero_copy_basic_offset_, virtual_addr_offset, fusion_flag); | ||||
uint32_t out_count = 0; | uint32_t out_count = 0; | ||||
data_size_ = output_size; | data_size_ = output_size; | ||||
if (!fusion_flag) { | if (!fusion_flag) { | ||||
GELOGI("[ZCPY] %s not set l2_fusion.", op_desc->GetName().c_str()); | |||||
out_count++; | out_count++; | ||||
data_info_.emplace_back(output_size, virtual_addr); | data_info_.emplace_back(output_size, virtual_addr); | ||||
relative_offset_.emplace_back(0); | relative_offset_.emplace_back(0); | ||||
GELOGI("[ZCPY] %s size is %ld, virtual_addr is %p.", op_desc->GetName().c_str(), output_size, virtual_addr); | |||||
GELOGD("[ZCPY] %s size is %ld, virtual_addr is %p.", op_desc->GetName().c_str(), output_size, virtual_addr); | |||||
} else { | } else { | ||||
GELOGI("[ZCPY] set l2_fusion for %s.", op_desc->GetName().c_str()); | GELOGI("[ZCPY] set l2_fusion for %s.", op_desc->GetName().c_str()); | ||||
for (size_t index = 0; index < zero_copy_basic_offset_.size(); ++index) { | for (size_t index = 0; index < zero_copy_basic_offset_.size(); ++index) { | ||||
@@ -73,7 +71,6 @@ Status ZeroCopyOffset::InitInputDataInfo(int64_t output_size, void *virtual_addr | |||||
Status ZeroCopyOffset::InitOutputDataInfo(const vector<int64_t> &input_size_list, | Status ZeroCopyOffset::InitOutputDataInfo(const vector<int64_t> &input_size_list, | ||||
const vector<void *> &virtual_addr_list, const OpDescPtr &op_desc, | const vector<void *> &virtual_addr_list, const OpDescPtr &op_desc, | ||||
const size_t &idx, bool &fusion_flag) { | const size_t &idx, bool &fusion_flag) { | ||||
GELOGI("[ZCPY] Start to InitOutputDataInfo of %s.", op_desc->GetName().c_str()); | |||||
int64_t size = input_size_list[idx]; | int64_t size = input_size_list[idx]; | ||||
auto tensor_desc = op_desc->GetInputDescPtr(idx); | auto tensor_desc = op_desc->GetInputDescPtr(idx); | ||||
GE_CHECK_NOTNULL(tensor_desc); | GE_CHECK_NOTNULL(tensor_desc); | ||||
@@ -82,7 +79,7 @@ Status ZeroCopyOffset::InitOutputDataInfo(const vector<int64_t> &input_size_list | |||||
return FAILED; | return FAILED; | ||||
} | } | ||||
GELOGI("Tensor data size: GetSize=%ld, GetTensorSizeInBytes=%ld", input_size_list[idx], size); | |||||
GELOGD("Tensor data size: GetSize=%ld, GetTensorSizeInBytes=%ld", input_size_list[idx], size); | |||||
basic_addr_ = virtual_addr_list[idx]; | basic_addr_ = virtual_addr_list[idx]; | ||||
(void)ge::AttrUtils::GetListInt(op_desc, ATTR_ZERO_COPY_BASIC_OFFSET, zero_copy_basic_offset_); | (void)ge::AttrUtils::GetListInt(op_desc, ATTR_ZERO_COPY_BASIC_OFFSET, zero_copy_basic_offset_); | ||||
@@ -90,13 +87,11 @@ Status ZeroCopyOffset::InitOutputDataInfo(const vector<int64_t> &input_size_list | |||||
GE_CHK_BOOL_EXEC(zero_copy_basic_offset_.size() == zero_copy_relative_offset_.size(), return PARAM_INVALID, | GE_CHK_BOOL_EXEC(zero_copy_basic_offset_.size() == zero_copy_relative_offset_.size(), return PARAM_INVALID, | ||||
"basic_offset_size should be equal to relative_offset_size"); | "basic_offset_size should be equal to relative_offset_size"); | ||||
int64_t virtual_addr_offset = op_desc->GetInputOffset().at(idx); | int64_t virtual_addr_offset = op_desc->GetInputOffset().at(idx); | ||||
GELOGI("virtual_addr_offset is %ld.", virtual_addr_offset); | |||||
IsL2Fusion(zero_copy_basic_offset_, virtual_addr_offset, fusion_flag); | IsL2Fusion(zero_copy_basic_offset_, virtual_addr_offset, fusion_flag); | ||||
uint32_t in_count = 0; | uint32_t in_count = 0; | ||||
data_size_ = size; | data_size_ = size; | ||||
if (!fusion_flag) { | if (!fusion_flag) { | ||||
GELOGI("[ZCPY] %s not set l2-fusion.", op_desc->GetName().c_str()); | |||||
in_count++; | in_count++; | ||||
data_info_.emplace_back(size, virtual_addr_list[idx]); | data_info_.emplace_back(size, virtual_addr_list[idx]); | ||||
// op_desc not set l2fusion when fusion_flag is false | // op_desc not set l2fusion when fusion_flag is false | ||||
@@ -132,10 +127,8 @@ void ZeroCopyOffset::IsL2Fusion(const vector<int64_t> &fusion_basic_addrs, const | |||||
void ZeroCopyOffset::SetInputOutsideAddrs(const vector<int64_t> &output_offset_list, void *addr, const size_t &index, | void ZeroCopyOffset::SetInputOutsideAddrs(const vector<int64_t> &output_offset_list, void *addr, const size_t &index, | ||||
bool fusion_flag, std::set<const void *> &real_virtual_addrs) { | bool fusion_flag, std::set<const void *> &real_virtual_addrs) { | ||||
GELOGI("[ZCPY] Start to SetInputOutsideAddrs for virtual_addr %p.", addr); | |||||
uint32_t out_count = 0; | uint32_t out_count = 0; | ||||
if (!fusion_flag) { | if (!fusion_flag) { | ||||
GELOGI("[ZCPY] not set l2-fusion for virtual_adr %p.", addr); | |||||
out_count++; | out_count++; | ||||
std::map<const void *, std::vector<void *>> addr_mapping; | std::map<const void *, std::vector<void *>> addr_mapping; | ||||
addr_mapping[addr] = {}; | addr_mapping[addr] = {}; | ||||
@@ -165,7 +158,6 @@ void ZeroCopyOffset::SetOutputOutsideAddrs(const int64_t &input_offset, const bo | |||||
GELOGI("[ZCPY] Start to SetOutputOutsideAddrs for virtual_addr %p.", addr); | GELOGI("[ZCPY] Start to SetOutputOutsideAddrs for virtual_addr %p.", addr); | ||||
uint32_t out_count = 0; | uint32_t out_count = 0; | ||||
if (!fusion_flag) { | if (!fusion_flag) { | ||||
GELOGI("[ZCPY] not set l2-fusion for virtual_addr %p.", addr); | |||||
out_count++; | out_count++; | ||||
std::map<const void *, std::vector<void *>> addr_mapping; | std::map<const void *, std::vector<void *>> addr_mapping; | ||||
addr_mapping[addr] = {}; | addr_mapping[addr] = {}; | ||||
@@ -199,7 +191,7 @@ bool ZeroCopyOffset::SetOutsideAddrsValue(ZeroCopyTask &zero_copy_task, void *ou | |||||
GE_CHK_STATUS(zero_copy_task.SetTaskArgsOffset(addr_val, offset), "Input args invalid."); | GE_CHK_STATUS(zero_copy_task.SetTaskArgsOffset(addr_val, offset), "Input args invalid."); | ||||
void *args_val = static_cast<uint8_t *>(args) + offset; | void *args_val = static_cast<uint8_t *>(args) + offset; | ||||
args_addrs->second.push_back(args_val); | args_addrs->second.push_back(args_val); | ||||
GELOGI("[ZCPY] set copy input: virtual_addr: 0x%lx, task_addr: %p, args: %p, offset: %zu.", addr_val, args_val, | |||||
GELOGD("[ZCPY] set copy input: virtual_addr: 0x%lx, task_addr: %p, args: %p, offset: %zu.", addr_val, args_val, | |||||
args, offset); | args, offset); | ||||
set_batch_label_flag = true; | set_batch_label_flag = true; | ||||
} | } | ||||
@@ -49,7 +49,7 @@ Status ZeroCopyTask::SetTaskArgsOffset(uintptr_t addr, size_t offset) { | |||||
it->second.insert(offset); | it->second.insert(offset); | ||||
} | } | ||||
GELOGI("[ZCPY] %s set task, virtual_addr: 0x%lx, args_addr: %p, size: %zu, offset: %zu", name_.c_str(), addr, | |||||
GELOGD("[ZCPY] %s set task, virtual_addr: 0x%lx, args_addr: %p, size: %zu, offset: %zu", name_.c_str(), addr, | |||||
args_addr_, args_size_, offset); | args_addr_, args_size_, offset); | ||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -167,7 +167,7 @@ Status ZeroCopyTask::DistributeParam(bool async_mode, rtStream_t stream) { | |||||
return RT_ERROR_TO_GE_STATUS(rt_err); | return RT_ERROR_TO_GE_STATUS(rt_err); | ||||
} | } | ||||
GELOGI("[ZCPY] %s refresh task args success, args_addr: %p, size: %zu, args_info_: %p, length: %zu", name_.c_str(), | |||||
GELOGD("[ZCPY] %s refresh task args success, args_addr: %p, size: %zu, args_info_: %p, length: %zu", name_.c_str(), | |||||
args_addr_, args_size_, args_info_.data(), args_info_.size()); | args_addr_, args_size_, args_info_.data(), args_info_.size()); | ||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -363,7 +363,7 @@ Status GraphManager::AddGraph(const GraphId &graph_id, const Graph &graph, | |||||
for (auto &subgraph : compute_graph->GetAllSubgraphs()) { | for (auto &subgraph : compute_graph->GetAllSubgraphs()) { | ||||
(void)AttrUtils::SetStr(*subgraph, ATTR_NAME_SESSION_GRAPH_ID, session_graph_id); | (void)AttrUtils::SetStr(*subgraph, ATTR_NAME_SESSION_GRAPH_ID, session_graph_id); | ||||
} | } | ||||
GELOGW("Get graph session_graph_id attr failed, set session id to default value: [0]"); | |||||
GELOGD("Get graph session_graph_id attr failed, set session id to default value: [0]"); | |||||
} | } | ||||
GraphNodePtr graph_node = MakeShared<ge::GraphNode>(graph_id); | GraphNodePtr graph_node = MakeShared<ge::GraphNode>(graph_id); | ||||
@@ -396,8 +396,6 @@ Status GraphManager::AddGraph(const GraphId &graph_id, const Graph &graph, | |||||
stages.builder.SetOptions(options_); | stages.builder.SetOptions(options_); | ||||
var_acc_ctrl_.AddGraph(graph_id, compute_graph); | var_acc_ctrl_.AddGraph(graph_id, compute_graph); | ||||
GELOGI("[GraphManager] add graph success, graph_id = %u.", graph_id); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -435,7 +433,7 @@ Status GraphManager::AddGraphWithCopy(const GraphId &graph_id, const Graph &grap | |||||
for (auto &subgraph : new_compute_graph->GetAllSubgraphs()) { | for (auto &subgraph : new_compute_graph->GetAllSubgraphs()) { | ||||
(void)AttrUtils::SetStr(*subgraph, ATTR_NAME_SESSION_GRAPH_ID, session_graph_id); | (void)AttrUtils::SetStr(*subgraph, ATTR_NAME_SESSION_GRAPH_ID, session_graph_id); | ||||
} | } | ||||
GELOGW("Get graph session_graph_id attr failed, set session id to default value: [0]"); | |||||
GELOGD("Get graph session_graph_id attr failed, set session id to default value: [0]"); | |||||
} | } | ||||
GraphNodePtr graph_node = MakeShared<ge::GraphNode>(graph_id); | GraphNodePtr graph_node = MakeShared<ge::GraphNode>(graph_id); | ||||
@@ -468,8 +466,6 @@ Status GraphManager::AddGraphWithCopy(const GraphId &graph_id, const Graph &grap | |||||
stages.builder.SetOptions(options_); | stages.builder.SetOptions(options_); | ||||
var_acc_ctrl_.AddGraph(graph_id, new_compute_graph); | var_acc_ctrl_.AddGraph(graph_id, new_compute_graph); | ||||
GELOGI("[GraphManager] add graph success, graph_id = %u.", graph_id); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -546,7 +542,7 @@ Status GraphManager::OptimizeSubGraphWithMultiThreads(ComputeGraphPtr compute_gr | |||||
const auto &root_subgraph_list = sub_graph_map[compute_graph]; | const auto &root_subgraph_list = sub_graph_map[compute_graph]; | ||||
std::string op_compile_strategy; | std::string op_compile_strategy; | ||||
(void)AttrUtils::GetStr(compute_graph, ATTR_NAME_OP_COMPILE_STRATEGY, op_compile_strategy); | (void)AttrUtils::GetStr(compute_graph, ATTR_NAME_OP_COMPILE_STRATEGY, op_compile_strategy); | ||||
GELOGI("OptimizeSubGraphWithMultiThreads Process op_compile_strategy:%s", op_compile_strategy.c_str()); | |||||
GELOGD("OptimizeSubGraphWithMultiThreads Process op_compile_strategy:%s", op_compile_strategy.c_str()); | |||||
for (const auto &subgraph : root_subgraph_list) { | for (const auto &subgraph : root_subgraph_list) { | ||||
if (!op_compile_strategy.empty()) { | if (!op_compile_strategy.empty()) { | ||||
(void) AttrUtils::SetStr(subgraph->GetSubGraph(), ATTR_NAME_OP_COMPILE_STRATEGY, op_compile_strategy); | (void) AttrUtils::SetStr(subgraph->GetSubGraph(), ATTR_NAME_OP_COMPILE_STRATEGY, op_compile_strategy); | ||||
@@ -576,7 +572,7 @@ Status GraphManager::OptimizeSubGraphWithMultiThreads(ComputeGraphPtr compute_gr | |||||
vector_future.emplace_back(std::move(f)); | vector_future.emplace_back(std::move(f)); | ||||
} | } | ||||
} | } | ||||
GELOGI("All sub graph num is %zu", vector_future.size()); | |||||
GELOGD("All sub graph num is %zu", vector_future.size()); | |||||
for (size_t i = 0; i < vector_future.size(); ++i) { | for (size_t i = 0; i < vector_future.size(); ++i) { | ||||
Status ret_status = vector_future[i].get(); | Status ret_status = vector_future[i].get(); | ||||
if (ret_status != SUCCESS) { | if (ret_status != SUCCESS) { | ||||
@@ -700,7 +696,7 @@ Status GraphManager::SetSubgraph(uint64_t session_id, ComputeGraphPtr compute_gr | |||||
/// Multiply optimize subgraph: | /// Multiply optimize subgraph: | ||||
/// 1. run lx buffer while build_mode is normal and buffer_optimize is empty or "off_optimize"; | /// 1. run lx buffer while build_mode is normal and buffer_optimize is empty or "off_optimize"; | ||||
/// 2. run lx fusion or buffer according build_mode and build_step in fe. | /// 2. run lx fusion or buffer according build_mode and build_step in fe. | ||||
GELOGI("Directly optimize subgraph with build mode:%s, and step:%s, buffer_optimize:%s.", | |||||
GELOGD("Directly optimize subgraph with build mode:%s, and step:%s, buffer_optimize:%s.", | |||||
options_.build_mode.c_str(), | options_.build_mode.c_str(), | ||||
options_.build_step.c_str(), | options_.build_step.c_str(), | ||||
buffer_optimize.c_str()); | buffer_optimize.c_str()); | ||||
@@ -747,7 +743,7 @@ Status GraphManager::PreRunOptimizeOriginalGraph(const GraphNodePtr &graph_node, | |||||
GE_CHK_STATUS_RET(graph_pass.Run(compute_graph)); | GE_CHK_STATUS_RET(graph_pass.Run(compute_graph)); | ||||
GE_CHK_STATUS_RET(stages.optimizer.IdentifyReference(compute_graph), "Identify reference failed."); | GE_CHK_STATUS_RET(stages.optimizer.IdentifyReference(compute_graph), "Identify reference failed."); | ||||
GELOGI("PreRun:PreRunOptimizeOriginalGraph success."); | |||||
GELOGD("PreRun:PreRunOptimizeOriginalGraph success."); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -762,10 +758,10 @@ Status GraphManager::PreRunOptimizeSubGraph(const GraphNodePtr &graph_node, | |||||
if (options_.build_mode == BUILD_MODE_TUNING && options_.build_step == BUILD_STEP_AFTER_UB_MATCH) { | if (options_.build_mode == BUILD_MODE_TUNING && options_.build_step == BUILD_STEP_AFTER_UB_MATCH) { | ||||
std::string tuning_path; | std::string tuning_path; | ||||
(void) GetContext().GetOption(TUNING_PATH, tuning_path); | (void) GetContext().GetOption(TUNING_PATH, tuning_path); | ||||
GELOGI("Dump path:%s.", tuning_path.c_str()); | |||||
GELOGD("Dump path:%s.", tuning_path.c_str()); | |||||
GraphUtils::DumpGEGraph(compute_graph, "", true, tuning_path); | GraphUtils::DumpGEGraph(compute_graph, "", true, tuning_path); | ||||
} | } | ||||
GELOGI("PreRun:PreRunOptimizeSubGraph success."); | |||||
GELOGD("PreRun:PreRunOptimizeSubGraph success."); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -785,12 +781,12 @@ Status GraphManager::PreRunAfterOptimizeSubGraph(const GraphNodePtr &graph_node, | |||||
} | } | ||||
GM_RUN_AND_DUMP_PERF("Build", Build, graph_node, compute_graph, ge_root_model, session_id); | GM_RUN_AND_DUMP_PERF("Build", Build, graph_node, compute_graph, ge_root_model, session_id); | ||||
GELOGI("PreRun:PreRunAfterOptimizeSubGraph success."); | |||||
GELOGD("PreRun:PreRunAfterOptimizeSubGraph success."); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
Status GraphManager::SetRtContext(rtContext_t rt_context, rtCtxMode_t mode, uint64_t session_id, uint32_t graph_id) { | Status GraphManager::SetRtContext(rtContext_t rt_context, rtCtxMode_t mode, uint64_t session_id, uint32_t graph_id) { | ||||
GELOGI("set rt_context, session id: %lu, graph id: %u, mode %d, device id:%u.", session_id, graph_id, | |||||
GELOGD("set rt_context, session id: %lu, graph id: %u, mode %d, device id:%u.", session_id, graph_id, | |||||
static_cast<int>(mode), ge::GetContext().DeviceId()); | static_cast<int>(mode), ge::GetContext().DeviceId()); | ||||
rtError_t rt_ret = rtCtxCreate(&rt_context, mode, ge::GetContext().DeviceId()); | rtError_t rt_ret = rtCtxCreate(&rt_context, mode, ge::GetContext().DeviceId()); | ||||
@@ -1251,7 +1247,7 @@ Status GraphManager::BuildGraphForUnregisteredOp(const GraphId &graph_id, const | |||||
Status GraphManager::BuildGraph(const GraphId &graph_id, const std::vector<GeTensor> &inputs, | Status GraphManager::BuildGraph(const GraphId &graph_id, const std::vector<GeTensor> &inputs, | ||||
GeRootModelPtr &ge_root_model, uint64_t session_id, bool async) { | GeRootModelPtr &ge_root_model, uint64_t session_id, bool async) { | ||||
GELOGI("[BuildGraph] start to build graph, graph_id=%u.", graph_id); | |||||
GELOGD("[BuildGraph] start to build graph, graph_id=%u.", graph_id); | |||||
if (inputs.empty()) { | if (inputs.empty()) { | ||||
GELOGW("[BuildGraph] BuildGraph warning: empty GeTensor inputs"); | GELOGW("[BuildGraph] BuildGraph warning: empty GeTensor inputs"); | ||||
} | } | ||||
@@ -1531,7 +1527,6 @@ Status GraphManager::ParseOptions(const std::map<std::string, std::string> &opti | |||||
// Set save_original_model flag (ge.save_original_model) | // Set save_original_model flag (ge.save_original_model) | ||||
ParseOption(options, SAVE_ORIGINAL_MODEL, options_.save_original_model); | ParseOption(options, SAVE_ORIGINAL_MODEL, options_.save_original_model); | ||||
GELOGI("Set save original model flag %s", options_.save_original_model.c_str()); | |||||
// Original model file name | // Original model file name | ||||
ParseOption(options, ORIGINAL_MODEL_FILE, options_.original_model_file); | ParseOption(options, ORIGINAL_MODEL_FILE, options_.original_model_file); | ||||
@@ -2242,7 +2237,7 @@ Status GraphManager::OptimizeStage1(ge::ComputeGraphPtr &compute_graph) { | |||||
} | } | ||||
Status GraphManager::OptimizeStage2(ge::ComputeGraphPtr &compute_graph) { | Status GraphManager::OptimizeStage2(ge::ComputeGraphPtr &compute_graph) { | ||||
GELOGI("Start optimize after merge sub graph."); | |||||
GELOGD("Start optimize after merge sub graph."); | |||||
PassManager after_merge_passes; | PassManager after_merge_passes; | ||||
GE_CHK_STATUS_RET(after_merge_passes.AddPass("OptimizeStage2::AfterMergePasses::LinkGenMaskNodesPass", | GE_CHK_STATUS_RET(after_merge_passes.AddPass("OptimizeStage2::AfterMergePasses::LinkGenMaskNodesPass", | ||||
@@ -2492,7 +2487,7 @@ Status GraphManager::ProcessSubGraphWithMultiThreads(GraphManager *graph_manager | |||||
ComputeGraphPtr compute_graph_tmp = sub_graph_info_ptr->GetSubGraph(); | ComputeGraphPtr compute_graph_tmp = sub_graph_info_ptr->GetSubGraph(); | ||||
const std::string &engine_name = sub_graph_info_ptr->GetEngineName(); | const std::string &engine_name = sub_graph_info_ptr->GetEngineName(); | ||||
GELOGI("ProcessSubGraphWithMultiThreads start, graph name is %s, engine_name is %s, thread id is %lu", | |||||
GELOGD("ProcessSubGraphWithMultiThreads start, graph name is %s, engine_name is %s, thread id is %lu", | |||||
compute_graph_tmp != nullptr ? compute_graph_tmp->GetName().c_str() : "", engine_name.c_str(), | compute_graph_tmp != nullptr ? compute_graph_tmp->GetName().c_str() : "", engine_name.c_str(), | ||||
pthread_self()); | pthread_self()); | ||||
GE_DUMP(compute_graph_tmp, "OptimizeSubGraphBefore"); | GE_DUMP(compute_graph_tmp, "OptimizeSubGraphBefore"); | ||||
@@ -2504,11 +2499,11 @@ Status GraphManager::ProcessSubGraphWithMultiThreads(GraphManager *graph_manager | |||||
GELOGE(ret, "SubGraph optimize Failed %s", engine_name.c_str()); | GELOGE(ret, "SubGraph optimize Failed %s", engine_name.c_str()); | ||||
return ret; | return ret; | ||||
} else { | } else { | ||||
GELOGI("SubGraph optimize success %s", engine_name.c_str()); | |||||
GELOGD("SubGraph optimize success %s", engine_name.c_str()); | |||||
} | } | ||||
GE_DUMP(compute_graph_tmp, "OptimizeSubGraphAfter"); | GE_DUMP(compute_graph_tmp, "OptimizeSubGraphAfter"); | ||||
sub_graph_info_ptr->SetSubGraph(compute_graph_tmp); | sub_graph_info_ptr->SetSubGraph(compute_graph_tmp); | ||||
GELOGI("ProcessSubGraphWithMultiThreads end, graph name is %s, engine_name is %s, thread id is %lu", | |||||
GELOGD("ProcessSubGraphWithMultiThreads end, graph name is %s, engine_name is %s, thread id is %lu", | |||||
compute_graph_tmp != nullptr ? compute_graph_tmp->GetName().c_str() : "", engine_name.c_str(), | compute_graph_tmp != nullptr ? compute_graph_tmp->GetName().c_str() : "", engine_name.c_str(), | ||||
pthread_self()); | pthread_self()); | ||||
} else { | } else { | ||||
@@ -642,7 +642,7 @@ ge::Status VarManager::SyncBroadCastData2Var(uint32_t graph_id, const std::strin | |||||
bool VarManager::IsVarAddr(const int64_t &offset) { | bool VarManager::IsVarAddr(const int64_t &offset) { | ||||
std::lock_guard<std::recursive_mutex> lock(mutex_); | std::lock_guard<std::recursive_mutex> lock(mutex_); | ||||
if (var_resource_ == nullptr) { | if (var_resource_ == nullptr) { | ||||
GELOGW("VarManager has not been init."); | |||||
GELOGD("VarManager has not been init."); | |||||
return false; | return false; | ||||
} | } | ||||
return var_resource_->IsVarAddr(offset); | return var_resource_->IsVarAddr(offset); | ||||
@@ -501,7 +501,7 @@ Status TransVarDataUtils::TransAllVarData(const vector<NodePtr> &variable_nodes, | |||||
} | } | ||||
Status TransVarDataUtils::CopyVarData(const ComputeGraphPtr &compute_graph, uint64_t session_id, uint32_t device_id) { | Status TransVarDataUtils::CopyVarData(const ComputeGraphPtr &compute_graph, uint64_t session_id, uint32_t device_id) { | ||||
GELOGI("CopyVarData start: session_id:%lu.", session_id); | |||||
GELOGD("CopyVarData start: session_id:%lu.", session_id); | |||||
if (compute_graph == nullptr) { | if (compute_graph == nullptr) { | ||||
GELOGE(FAILED, "compute_graph is nullptr"); | GELOGE(FAILED, "compute_graph is nullptr"); | ||||
return FAILED; | return FAILED; | ||||
@@ -58,8 +58,7 @@ void AddNodeInputProperty(ComputeGraphPtr &compute_graph) { | |||||
for (auto &in_data_anchor : node->GetAllInDataAnchors()) { | for (auto &in_data_anchor : node->GetAllInDataAnchors()) { | ||||
auto peer_out_anchor = in_data_anchor->GetPeerOutAnchor(); | auto peer_out_anchor = in_data_anchor->GetPeerOutAnchor(); | ||||
GE_IF_BOOL_EXEC( | |||||
peer_out_anchor == nullptr, GELOGW("peer_out_anchor is nullptr! node: %s", node->GetName().c_str()); continue); | |||||
GE_IF_BOOL_EXEC(peer_out_anchor == nullptr, continue); | |||||
ge::NodePtr src_node = peer_out_anchor->GetOwnerNode(); | ge::NodePtr src_node = peer_out_anchor->GetOwnerNode(); | ||||
src_index_list = node_op_desc->GetSrcIndex(); | src_index_list = node_op_desc->GetSrcIndex(); | ||||
@@ -242,11 +241,11 @@ Status GraphOptimize::OptimizeGraphBeforeBuildForRts(ComputeGraphPtr &compute_gr | |||||
} | } | ||||
auto graph_optimizer = instance_ptr->OpsKernelManagerObj().GetAllGraphOptimizerObjsByPriority(); | auto graph_optimizer = instance_ptr->OpsKernelManagerObj().GetAllGraphOptimizerObjsByPriority(); | ||||
GELOGI("optimize by opskernel in graph optimize before build phase. num of graph_optimizer is %zu.", | |||||
GELOGD("optimize by opskernel in graph optimize before build phase. num of graph_optimizer is %zu.", | |||||
graph_optimizer.size()); | graph_optimizer.size()); | ||||
Status ret = SUCCESS; | Status ret = SUCCESS; | ||||
string exclude_core_Type = (core_type_ == kVectorCore) ? kAicoreEngine : kVectorEngine; | string exclude_core_Type = (core_type_ == kVectorCore) ? kAicoreEngine : kVectorEngine; | ||||
GELOGI("[OptimizeGraphBeforeBuildForRts]: engine type will exclude: %s, core_type_: %s", | |||||
GELOGD("[OptimizeGraphBeforeBuildForRts]: engine type will exclude: %s, core_type_: %s", | |||||
exclude_core_Type.c_str(), core_type_.c_str()); | exclude_core_Type.c_str(), core_type_.c_str()); | ||||
if (graph_optimizer.size() != 0) { | if (graph_optimizer.size() != 0) { | ||||
for (auto iter = graph_optimizer.begin(); iter != graph_optimizer.end(); ++iter) { | for (auto iter = graph_optimizer.begin(); iter != graph_optimizer.end(); ++iter) { | ||||
@@ -50,7 +50,7 @@ Status EnginePlacer::Check() const { | |||||
Status EnginePlacer::Run() { | Status EnginePlacer::Run() { | ||||
std::lock_guard<std::mutex> lock(check_support_cost_mutex); | std::lock_guard<std::mutex> lock(check_support_cost_mutex); | ||||
GELOGI("Engine placer starts."); | |||||
GELOGD("Engine placer starts."); | |||||
if (Check() != SUCCESS) { | if (Check() != SUCCESS) { | ||||
return FAILED; | return FAILED; | ||||
} | } | ||||
@@ -101,7 +101,7 @@ Status EnginePlacer::Run() { | |||||
for (auto &it : ge::GELib::GetInstance()->DNNEngineManagerObj().GetCheckSupportCost()) { | for (auto &it : ge::GELib::GetInstance()->DNNEngineManagerObj().GetCheckSupportCost()) { | ||||
GEEVENT("The time cost of %s::CheckSupported is [%lu] micro second.", it.first.c_str(), it.second); | GEEVENT("The time cost of %s::CheckSupported is [%lu] micro second.", it.first.c_str(), it.second); | ||||
} | } | ||||
GELOGI("Engine placer ends."); | |||||
GELOGD("Engine placer ends."); | |||||
return is_check_support_success ? SUCCESS : FAILED; | return is_check_support_success ? SUCCESS : FAILED; | ||||
} | } | ||||
@@ -223,7 +223,7 @@ Status ge::GraphPartitioner::MergeSubGraph(ge::ComputeGraphPtr &output_merged_co | |||||
GELOGE(GE_GRAPH_UNSUPPORTED, "Cannot call merging in partition mode"); | GELOGE(GE_GRAPH_UNSUPPORTED, "Cannot call merging in partition mode"); | ||||
return FAILED; | return FAILED; | ||||
} | } | ||||
GELOGI("Graph merge starts."); | |||||
GELOGD("Graph merge starts."); | |||||
// check input param | // check input param | ||||
for (const auto &it : sub_graph_list) { | for (const auto &it : sub_graph_list) { | ||||
if (it == nullptr) { | if (it == nullptr) { | ||||
@@ -261,7 +261,7 @@ Status ge::GraphPartitioner::MergeSubGraph(ge::ComputeGraphPtr &output_merged_co | |||||
return FAILED; | return FAILED; | ||||
} | } | ||||
GE_TIMESTAMP_END(MergeSubGraphEnginePlacerRun, "GraphPartitioner::MergeGraphEnginePlacerRun"); | GE_TIMESTAMP_END(MergeSubGraphEnginePlacerRun, "GraphPartitioner::MergeGraphEnginePlacerRun"); | ||||
GELOGI("Graph merge ends."); | |||||
GELOGD("Graph merge ends."); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -581,7 +581,7 @@ Status ge::GraphPartitioner::Initialize(ge::ComputeGraphPtr compute_graph) { | |||||
new_cluster->engine_name_.c_str(), new_cluster->index_, new_cluster->stream_label_.c_str()); | new_cluster->engine_name_.c_str(), new_cluster->index_, new_cluster->stream_label_.c_str()); | ||||
temp_index++; | temp_index++; | ||||
} | } | ||||
GELOGI("Initialize ends."); | |||||
GELOGD("Initialize ends."); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -754,11 +754,11 @@ void ge::GraphPartitioner::MarkClusters() { | |||||
} | } | ||||
} | } | ||||
} | } | ||||
GELOGI("MarkClusters ends."); | |||||
GELOGD("MarkClusters ends."); | |||||
} | } | ||||
Status ge::GraphPartitioner::SplitSubGraphs(ge::ComputeGraphPtr compute_graph) { | Status ge::GraphPartitioner::SplitSubGraphs(ge::ComputeGraphPtr compute_graph) { | ||||
GELOGI("SplitSubGraphs starts."); | |||||
GELOGD("SplitSubGraphs starts."); | |||||
if (compute_graph == nullptr) { | if (compute_graph == nullptr) { | ||||
GELOGE(FAILED, "parameter ptr is null."); | GELOGE(FAILED, "parameter ptr is null."); | ||||
return FAILED; | return FAILED; | ||||
@@ -823,7 +823,7 @@ Status ge::GraphPartitioner::SplitSubGraphs(ge::ComputeGraphPtr compute_graph) { | |||||
} | } | ||||
} | } | ||||
} | } | ||||
GELOGI("SplitSubGraphs ends."); | |||||
GELOGD("SplitSubGraphs ends."); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -46,7 +46,7 @@ Status AtomicAddrCleanPass::Run(ComputeGraphPtr graph) { | |||||
} | } | ||||
} | } | ||||
if (atomic_node_vec.empty()) { | if (atomic_node_vec.empty()) { | ||||
GELOGI("There is no atomic node. Ignore atomicAddrClean pass."); | |||||
GELOGD("There is no atomic node. Ignore atomicAddrClean pass."); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
@@ -326,7 +326,7 @@ Status CondRemovePass::GetCondInfo(const NodePtr &node, ComputeGraphPtr &graph, | |||||
return FAILED; | return FAILED; | ||||
} | } | ||||
} else { | } else { | ||||
GELOGI("no need cond_pass for node %s.", node->GetName().c_str()); | |||||
GELOGD("no need cond_pass for node %s.", node->GetName().c_str()); | |||||
return NOT_CHANGED; | return NOT_CHANGED; | ||||
} | } | ||||
@@ -278,7 +278,7 @@ Status MemcpyAddrAsyncPass::InsertMemcpyAddrAsyncNode(const OutDataAnchorPtr &ou | |||||
} | } | ||||
Status MemcpyAddrAsyncPass::InsertMemAddrAsyncNodeBeforeNetoutput(const ComputeGraphPtr &graph, const NodePtr &node) { | Status MemcpyAddrAsyncPass::InsertMemAddrAsyncNodeBeforeNetoutput(const ComputeGraphPtr &graph, const NodePtr &node) { | ||||
GELOGI("Start AddMemcpyAddrAsyncNode for %s.", node->GetName().c_str()); | |||||
GELOGD("Start AddMemcpyAddrAsyncNode for %s.", node->GetName().c_str()); | |||||
for (const auto &in_data_anchor : node->GetAllInDataAnchors()) { | for (const auto &in_data_anchor : node->GetAllInDataAnchors()) { | ||||
auto in_node = NodeUtils::GetInDataNodeByIndex(*node, in_data_anchor->GetIdx()); | auto in_node = NodeUtils::GetInDataNodeByIndex(*node, in_data_anchor->GetIdx()); | ||||
GE_CHECK_NOTNULL(in_node); | GE_CHECK_NOTNULL(in_node); | ||||
@@ -36,7 +36,7 @@ Status MultiBatchPass::Run(ComputeGraphPtr graph) { | |||||
OutDataAnchorPtr pred_value = nullptr; | OutDataAnchorPtr pred_value = nullptr; | ||||
Status ret = FindPredValue(graph, pred_value); | Status ret = FindPredValue(graph, pred_value); | ||||
if (ret == NOT_CHANGED) { | if (ret == NOT_CHANGED) { | ||||
GELOGI("SwitchN node not exist, graph not changed."); | |||||
GELOGD("SwitchN node not exist, graph not changed."); | |||||
return SUCCESS; | return SUCCESS; | ||||
} | } | ||||
if (ret != SUCCESS) { | if (ret != SUCCESS) { | ||||
@@ -160,7 +160,7 @@ Status MultiBatchPass::FindPredValue(const ComputeGraphPtr &graph, OutDataAnchor | |||||
} | } | ||||
if (switch_n_nodes_.empty()) { | if (switch_n_nodes_.empty()) { | ||||
GELOGI("SwitchN node not exist."); | |||||
GELOGD("SwitchN node not exist."); | |||||
return NOT_CHANGED; | return NOT_CHANGED; | ||||
} | } | ||||
@@ -128,7 +128,7 @@ Status SetInputOutputOffsetPass::SetInputOffsetForHcom(const ge::NodePtr &node, | |||||
} | } | ||||
Status SetInputOutputOffsetPass::SetInputOffset(const NodePtr &node, const vector<int> &connect_input) { | Status SetInputOutputOffsetPass::SetInputOffset(const NodePtr &node, const vector<int> &connect_input) { | ||||
GELOGI("Start to SetInputOffset for %s.", node->GetName().c_str()); | |||||
GELOGD("Start to SetInputOffset for %s.", node->GetName().c_str()); | |||||
std::vector<int64_t> memory_type; | std::vector<int64_t> memory_type; | ||||
auto op_desc = node->GetOpDesc(); | auto op_desc = node->GetOpDesc(); | ||||
(void)ge::AttrUtils::GetListInt(op_desc, ATTR_NAME_INPUT_MEM_TYPE_LIST, memory_type); | (void)ge::AttrUtils::GetListInt(op_desc, ATTR_NAME_INPUT_MEM_TYPE_LIST, memory_type); | ||||
@@ -241,7 +241,7 @@ Status SetInputOutputOffsetPass::SetOutputOffsetForHcom(const NodePtr &node, con | |||||
} | } | ||||
Status SetInputOutputOffsetPass::SetOutputOffset(const NodePtr &node, const vector<int> &connect_output) { | Status SetInputOutputOffsetPass::SetOutputOffset(const NodePtr &node, const vector<int> &connect_output) { | ||||
GELOGI("Start SetOutputOffset of %s.", node->GetName().c_str()); | |||||
GELOGD("Start SetOutputOffset of %s.", node->GetName().c_str()); | |||||
bool attr_no_task = false; | bool attr_no_task = false; | ||||
bool get_attr_no_task = ge::AttrUtils::GetBool(node->GetOpDesc(), ATTR_NAME_NOTASK, attr_no_task); | bool get_attr_no_task = ge::AttrUtils::GetBool(node->GetOpDesc(), ATTR_NAME_NOTASK, attr_no_task); | ||||
if (get_attr_no_task && attr_no_task) { | if (get_attr_no_task && attr_no_task) { | ||||
@@ -504,7 +504,7 @@ void PrintOptionMap(std::map<std::string, std::string> &options, std::string tip | |||||
for (auto iter = options.begin(); iter != options.end(); iter++) { | for (auto iter = options.begin(); iter != options.end(); iter++) { | ||||
std::string key = iter->first; | std::string key = iter->first; | ||||
std::string option_name = iter->second; | std::string option_name = iter->second; | ||||
GELOGI("%s set successfully, option_key=%s, option_value=%s", tips.c_str(), key.c_str(), option_name.c_str()); | |||||
GELOGD("%s set successfully, option_key=%s, option_value=%s", tips.c_str(), key.c_str(), option_name.c_str()); | |||||
} | } | ||||
} | } | ||||
@@ -340,7 +340,7 @@ void Impl::SetRtSocVersion() { | |||||
if (rt_ret != RT_ERROR_NONE) { | if (rt_ret != RT_ERROR_NONE) { | ||||
GELOGW("Set soc version %s failed. ret:0x%X", soc_version, rt_ret); | GELOGW("Set soc version %s failed. ret:0x%X", soc_version, rt_ret); | ||||
} | } | ||||
GELOGI("Set soc version %s success.", soc_version); | |||||
GELOGD("Set soc version %s success.", soc_version); | |||||
} | } | ||||
} | } | ||||
@@ -359,25 +359,25 @@ graphStatus Impl::CreateInputsForIRBuild(const ge::Graph &graph, vector<ge::GeTe | |||||
GE_CHECK_NOTNULL(op); | GE_CHECK_NOTNULL(op); | ||||
if (op->GetType() == DATA) { | if (op->GetType() == DATA) { | ||||
(void)AttrUtils::SetInt(op, ATTR_NAME_INDEX, index++); | (void)AttrUtils::SetInt(op, ATTR_NAME_INDEX, index++); | ||||
GELOGI("Data op inputDesc size: %zu", op->GetAllInputsDesc().size()); | |||||
GELOGD("Data op inputDesc size: %zu", op->GetAllInputsDesc().size()); | |||||
ge::GeTensorDesc tensor = op->GetInputDesc(0); | ge::GeTensorDesc tensor = op->GetInputDesc(0); | ||||
string data_op_name = op->GetName(); | string data_op_name = op->GetName(); | ||||
GELOGI("Data op name: %s", data_op_name.c_str()); | |||||
GELOGD("Data op name: %s", data_op_name.c_str()); | |||||
ge::GeShape data_shape; | ge::GeShape data_shape; | ||||
auto iter = omg_context_.input_dims.find(data_op_name); | auto iter = omg_context_.input_dims.find(data_op_name); | ||||
if (iter != omg_context_.input_dims.end()) { | if (iter != omg_context_.input_dims.end()) { | ||||
data_shape = ge::GeShape(iter->second); | data_shape = ge::GeShape(iter->second); | ||||
GELOGI("Data op get shape from Context."); | |||||
GELOGD("Data op get shape from Context."); | |||||
} else { | } else { | ||||
data_shape = tensor.GetShape(); | data_shape = tensor.GetShape(); | ||||
GELOGI("Data op get shape from InputDesc in ge ir graph."); | |||||
GELOGD("Data op get shape from InputDesc in ge ir graph."); | |||||
} | } | ||||
// If user point input format, do work for all data ops; else do according to tensor_desc | // If user point input format, do work for all data ops; else do according to tensor_desc | ||||
auto data_format = omg_context_.format != domi::DOMI_TENSOR_ND ? | auto data_format = omg_context_.format != domi::DOMI_TENSOR_ND ? | ||||
ge::TypeUtils::DomiFormatToFormat(omg_context_.format) : tensor.GetFormat(); | ge::TypeUtils::DomiFormatToFormat(omg_context_.format) : tensor.GetFormat(); | ||||
ge::DataType data_type = tensor.GetDataType(); | ge::DataType data_type = tensor.GetDataType(); | ||||
string data_type_str = ge::TypeUtils::DataTypeToSerialString(data_type); | string data_type_str = ge::TypeUtils::DataTypeToSerialString(data_type); | ||||
GELOGI("Data op get data type:%s from InputDesc in ge ir graph.", data_type_str.c_str()); | |||||
GELOGD("Data op get data type:%s from InputDesc in ge ir graph.", data_type_str.c_str()); | |||||
ge::GeTensor inputTensor; | ge::GeTensor inputTensor; | ||||
ge::GeTensorDesc desc(data_shape, ge::Format(data_format), data_type); | ge::GeTensorDesc desc(data_shape, ge::Format(data_format), data_type); | ||||
@@ -391,7 +391,7 @@ void OpsKernelManager::GetGraphOptimizerByEngine(const std::string &engine_name, | |||||
continue; | continue; | ||||
} | } | ||||
if (attrs.engineName == engine_name) { | if (attrs.engineName == engine_name) { | ||||
GELOGI("GetGraphOptimizerByEngine GraphOptimzer name: %s, engineName: %s", (it.first).c_str(), | |||||
GELOGD("GetGraphOptimizerByEngine GraphOptimzer name: %s, engineName: %s", (it.first).c_str(), | |||||
attrs.engineName.c_str()); | attrs.engineName.c_str()); | ||||
graph_optimizer.push_back(it.second); | graph_optimizer.push_back(it.second); | ||||
} | } | ||||