| @@ -111,7 +111,7 @@ const char *const kTotalSize = "total_size"; | |||
| const char *const kTaskCount = "task_count"; | |||
| const char *const kTaskId = "task_id"; | |||
| const char *const kIndexId = "index_id"; | |||
| const char *const kTimeStamp = "time_stamp"; | |||
| const char *const kTimeStamp = "time_stamp"; | |||
| const char *const kTagId = "tag_id"; | |||
| const char* const kRequestId = "request_id"; | |||
| const char* const kThreadId = "thread_id"; | |||
| @@ -2290,12 +2290,12 @@ Status DavinciModel::ProfileStepInfo(DavinciModel *model, uint16_t tag_id) { | |||
| int64_t time = timespec.tv_sec * 1000 * 1000 * 1000 + timespec.tv_nsec; | |||
| uint32_t task_id = 0; | |||
| uint32_t stream_id = 0; | |||
| rtError_t rt_ret = rtGetTaskIdAndStreamID(&task_id, &stream_id); | |||
| rt_ret = rtGetTaskIdAndStreamID(&task_id, &stream_id); | |||
| if (rt_ret != RT_ERROR_NONE) { | |||
| GELOGE(RT_FAILED, "[Get][RtsInfo] task_id and stream_id failed, ret: 0x%X.", rt_ret); | |||
| return RT_ERROR_TO_GE_STATUS(rt_ret); | |||
| } | |||
| GELOGD("Get profiling args, task id[%u], stream id[%u]", task_id, stream_id); | |||
| GELOGD("Get profiling args, task_id[%u], stream_id[%u]", task_id, stream_id); | |||
| uint32_t device_id = model->GetDeviceId(); | |||
| Json step_info; | |||
| @@ -2617,7 +2617,7 @@ void *DavinciModel::Run(DavinciModel *model) { | |||
| continue; | |||
| } | |||
| // tag_id 0 means step begin, 1 meas step end. | |||
| (void)ProfileStepInfo(model, 0); | |||
| (void)DavinciModel::ProfileStepInfo(model, 0); | |||
| GELOGI("Getting the input data, model_id:%u", model_id); | |||
| GE_IF_BOOL_EXEC(!model->RunFlag(), break); | |||
| @@ -2698,7 +2698,7 @@ void *DavinciModel::Run(DavinciModel *model) { | |||
| model->SetProfileTime(MODEL_AFTER_PROC_END)); | |||
| GE_IF_BOOL_EXEC(ProfilingManager::Instance().ProfilingModelExecuteOn(), (void)model->SinkTimeProfile(current_data)); | |||
| // tag_id 0 means step begin, 1 meas step end. | |||
| (void)ProfileStepInfo(model, 1); | |||
| (void)DavinciModel::ProfileStepInfo(model, 1); | |||
| model->iterator_count_++; | |||
| model->is_first_execute_ = false; | |||
| @@ -85,7 +85,7 @@ Status HybridModelExecutor::ProfileStepInfo(uint16_t tag_id) { | |||
| auto &prof_mgr = ProfilingManager::Instance(); | |||
| if (prof_mgr.ProfilingModelExecuteOn()) { | |||
| uint64_t index_id = context_.iteration + 1; | |||
| uint64_t model_id = static_cast<uint64_t>(model->Id()); | |||
| uint64_t model_id = static_cast<uint64_t>(model_->GetModelId()); | |||
| GELOGD("Profiling Step Info TraceTask execute async start, index_id = %lu, model_id = %lu, tag_id = %u", | |||
| index_id, model_id, tag_id); | |||
| rtError_t rt_ret = rtProfilerTraceEx(index_id, model_id, tag_id, stream_); | |||
| @@ -101,12 +101,12 @@ Status HybridModelExecutor::ProfileStepInfo(uint16_t tag_id) { | |||
| int64_t time = timespec.tv_sec * 1000 * 1000 * 1000 + timespec.tv_nsec; | |||
| uint32_t task_id = 0; | |||
| uint32_t stream_id = 0; | |||
| rtError_t rt_ret = rtGetTaskIdAndStreamID(&task_id, &stream_id); | |||
| rt_ret = rtGetTaskIdAndStreamID(&task_id, &stream_id); | |||
| if (rt_ret != RT_ERROR_NONE) { | |||
| GELOGE(RT_FAILED, "[Get][RtsInfo] task_id and stream_id failed, ret: 0x%X.", rt_ret); | |||
| return RT_ERROR_TO_GE_STATUS(rt_ret); | |||
| } | |||
| GELOGD("Get profiling args, task id[%u], stream id[%u]", task_id, stream_id); | |||
| GELOGD("Get profiling args, task_id[%u], stream_id[%u]", task_id, stream_id); | |||
| Json step_info; | |||
| step_info[kIndexId] = index_id; | |||
| @@ -115,7 +115,7 @@ Status HybridModelExecutor::ProfileStepInfo(uint16_t tag_id) { | |||
| step_info[kTagId] = tag_id; | |||
| step_info[kTaskId] = task_id; | |||
| step_info[kStreamId] = stream_id; | |||
| tep_info[kThreadId] = mmGetTid(); | |||
| step_info[kThreadId] = mmGetTid(); | |||
| std::string reported_data; | |||
| try { | |||
| @@ -245,7 +245,7 @@ TEST_F(UtestGeHybrid, init_weight_success) { | |||
| HybridModelBuilder hybrid_model_builder(hybrid_model); | |||
| auto ret = hybrid_model_builder.InitWeights(); | |||
| ASSERT_EQ(ret,SUCCESS); | |||
| Buffer weight_buffer = Buffer(128,0); | |||
| Buffer weight_buffer = Buffer(128,0);s | |||
| ge_sub_model->SetWeight(weight_buffer); | |||
| ret = hybrid_model_builder.InitWeights(); | |||
| ASSERT_EQ(ret,PARAM_INVALID); | |||
| @@ -255,7 +255,7 @@ TEST_F(UtestGeHybrid, Step_info_profile) { | |||
| ProfilingManager::Instance().prof_cb_.msprofReporterCallback = MsprofReport; | |||
| auto graph = make_shared<ComputeGraph>("graph"); | |||
| auto root_model = make_shared<GeRootModel>(graph); | |||
| HybridModel model(model); | |||
| HybridModel model(root_model); | |||
| HybridModelExecutor executor(&model, 0, nullptr); | |||
| ASSERT_EQ(executor.ProfileStepInfo(), SUCCESS): | |||
| ASSERT_EQ(executor.ProfileStepInfo(0), SUCCESS): | |||
| } | |||