Browse Source

Pre Merge pull request !1052 from zhengyuanhua/development

pull/1052/MERGE
zhengyuanhua Gitee 5 years ago
parent
commit
fb5955d505
4 changed files with 13 additions and 13 deletions
  1. +7
    -2
      ge/graph/load/model_manager/davinci_model.cc
  2. +4
    -9
      ge/graph/load/model_manager/model_manager.cc
  3. +1
    -1
      metadef
  4. +1
    -1
      parser

+ 7
- 2
ge/graph/load/model_manager/davinci_model.cc View File

@@ -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());


+ 4
- 9
ge/graph/load/model_manager/model_manager.cc View File

@@ -328,7 +328,8 @@ Status ModelManager::LoadModelOnline(uint32_t &model_id, const shared_ptr<ge::Ge
GELOGE(FAILED, "davinci_model is nullptr");
return FAILED;
}

davinci_model->SetProfileTime(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_ptr<ge::Ge
InsertModel(model_id, davinci_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);
} while (0);

GE_CHK_RT(rtDeviceReset(static_cast<int32_t>(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);


+ 1
- 1
metadef

@@ -1 +1 @@
Subproject commit 848cf412caa9b42ce4e75ab4d0a147ec97dc579b
Subproject commit f685f81199b26c8a4503174a4f70858725828b2a

+ 1
- 1
parser

@@ -1 +1 @@
Subproject commit 756c64c59e451a955e81b59d957ad55f96c27d89
Subproject commit 3c1a102a9236341830dcd97979f89315ca28602b

Loading…
Cancel
Save