Browse Source

Add ut.

tags/v1.3.0
zhaozhixuan 3 years ago
parent
commit
06f291208c
2 changed files with 4 additions and 0 deletions
  1. +2
    -0
      ge/graph/load/model_manager/davinci_model.cc
  2. +2
    -0
      ge/hybrid/executor/hybrid_model_executor.cc

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

@@ -3701,12 +3701,14 @@ Status DavinciModel::NnExecute(rtStream_t stream, bool async_mode, const InputDa
GE_CHK_STATUS_RET_NOLOG(
ProfilingManager::Instance().ProfileStepInfo(index_id, model_id, 0, rt_model_stream_, device_id));
}
GELOGD("rtModelExecute do");
GE_IF_BOOL_EXEC(profiling_model_execute_on, SetProfileTime(MODEL_INFER_START));
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_IF_BOOL_EXEC(profiling_model_execute_on, SetProfileTime(MODEL_INFER_END));
GELOGD("rtModelExecute end");

if (profiling_model_execute_on) {
GE_CHK_STATUS_RET_NOLOG(
ProfilingManager::Instance().ProfileStepInfo(index_id, model_id, 1, rt_model_stream_, device_id));


+ 2
- 0
ge/hybrid/executor/hybrid_model_executor.cc View File

@@ -86,9 +86,11 @@ Status HybridModelExecutor::ExecuteGraphInternal(SubgraphExecutor &executor,
if (prof_mgr.ProfilingModelExecuteOn()) {
GE_CHK_STATUS_RET_NOLOG(prof_mgr.ProfileStepInfo(index_id, model_id, 0, stream_, device_id));
}

HYBRID_CHK_STATUS_RET(executor.ExecuteAsync(args.inputs, args.input_desc, args.outputs),
"Failed to execute partitioned call.");
RECORD_MODEL_EXECUTION_EVENT(&context_, "[ExecuteAsync] End");

if (prof_mgr.ProfilingModelExecuteOn()) {
GE_CHK_STATUS_RET_NOLOG(prof_mgr.ProfileStepInfo(index_id, model_id, 1, stream_, device_id));
}


Loading…
Cancel
Save