diff --git a/ge/graph/load/model_manager/davinci_model.cc b/ge/graph/load/model_manager/davinci_model.cc index ed2428d9..8d6dca2a 100755 --- a/ge/graph/load/model_manager/davinci_model.cc +++ b/ge/graph/load/model_manager/davinci_model.cc @@ -728,6 +728,7 @@ Status DavinciModel::Init(void *dev_ptr, size_t mem_size, void *weight_ptr, size GE_CHK_RT_RET(rtSetCtxINFMode((fp_ceiling_mode != "0"))); } + SetProfileTime(MODEL_LOAD_END); // collect profiling for ge GE_CHK_STATUS_RET(InitModelProfile(), "Init model profile failed"); auto &profiling_manager = ProfilingManager::Instance(); @@ -2279,8 +2280,12 @@ Status DavinciModel::SinkModelProfile() { } // stream id info - uint32_t streamId = profile.fusion_info.stream_id; - reporter_data.data = (unsigned char *)&streamId; + uint32_t stream_id = 0; + auto iter = profiler_report_op_info_.find(fusion_op_name); + if (iter != profiler_report_op_info_.end()) { + stream_id = iter->second.second; + } + reporter_data.data = (unsigned char *)&stream_id; reporter_data.dataLen = sizeof(int32_t); GE_CHK_BOOL_EXEC(prof_mgr.CallMsprofReport(reporter_data) == 0, return FAILED, "Reporter data fail, model id:%u.", this->Id()); diff --git a/ge/graph/load/model_manager/model_manager.cc b/ge/graph/load/model_manager/model_manager.cc index 4eb3254b..6e88e314 100755 --- a/ge/graph/load/model_manager/model_manager.cc +++ b/ge/graph/load/model_manager/model_manager.cc @@ -328,7 +328,8 @@ Status ModelManager::LoadModelOnline(uint32_t &model_id, const shared_ptrSetProfileTime(MODEL_LOAD_START, (timespec.tv_sec * kTimeSpecNano + + timespec.tv_nsec)); // 1000 ^ 3 converts second to nanosecond davinci_model->SetId(model_id); davinci_model->SetDeviceId(GetContext().DeviceId()); @@ -355,10 +356,6 @@ Status ModelManager::LoadModelOnline(uint32_t &model_id, const shared_ptrSetProfileTime(MODEL_LOAD_START, (timespec.tv_sec * kTimeSpecNano + - timespec.tv_nsec)); // 1000 ^ 3 converts second to nanosecond - davinci_model->SetProfileTime(MODEL_LOAD_END); } while (0); GE_CHK_RT(rtDeviceReset(static_cast(GetContext().DeviceId()))); @@ -1085,6 +1082,8 @@ Status ModelManager::LoadModelOffline(uint32_t &model_id, const ModelData &model GELOGE(ACL_ERROR_GE_MEMORY_ALLOCATION, "Make shared failed since other exception raise"); return ACL_ERROR_GE_MEMORY_ALLOCATION; } + davinci_model->SetProfileTime(MODEL_LOAD_START, (timespec.tv_sec * kTimeSpecNano + + timespec.tv_nsec)); // 1000 ^ 3 converts second to nanosecond ret = davinci_model->Assign(ge_model); if (ret != SUCCESS) { GELOGW("assign model failed."); @@ -1122,10 +1121,6 @@ Status ModelManager::LoadModelOffline(uint32_t &model_id, const ModelData &model GELOGI("Parse model %u success.", model_id); - davinci_model->SetProfileTime(MODEL_LOAD_START, (timespec.tv_sec * kTimeSpecNano + - timespec.tv_nsec)); // 1000 ^ 3 converts second to nanosecond - davinci_model->SetProfileTime(MODEL_LOAD_END); - GE_IF_BOOL_EXEC(ret == SUCCESS, device_count++); return SUCCESS; } while (0); diff --git a/metadef b/metadef index 848cf412..f685f811 160000 --- a/metadef +++ b/metadef @@ -1 +1 @@ -Subproject commit 848cf412caa9b42ce4e75ab4d0a147ec97dc579b +Subproject commit f685f81199b26c8a4503174a4f70858725828b2a diff --git a/parser b/parser index 756c64c5..3c1a102a 160000 --- a/parser +++ b/parser @@ -1 +1 @@ -Subproject commit 756c64c59e451a955e81b59d957ad55f96c27d89 +Subproject commit 3c1a102a9236341830dcd97979f89315ca28602b