|
|
@@ -171,9 +171,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status SingleOp::ExecuteAsync(c |
|
|
|
if (ret != SUCCESS) { |
|
|
|
return ret; |
|
|
|
} |
|
|
|
if (ProfilingManager::Instance().ProfilingModelExecuteOn()) { |
|
|
|
GE_CHK_STATUS_RET_NOLOG(ProfilingTaskInfo(index)); |
|
|
|
} |
|
|
|
GE_CHK_STATUS_RET_NOLOG(ProfilingTaskInfo(index)); |
|
|
|
index++; |
|
|
|
} |
|
|
|
|
|
|
@@ -181,6 +179,9 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status SingleOp::ExecuteAsync(c |
|
|
|
} |
|
|
|
|
|
|
|
Status SingleOp::ProfilingTaskInfo(uint32_t index) { |
|
|
|
if (!ProfilingManager::Instance().ProfilingModelExecuteOn()) { |
|
|
|
return SUCCESS; |
|
|
|
} |
|
|
|
if (op_name_.size() <= index) { |
|
|
|
GELOGE(ACL_ERROR_GE_PARAM_INVALID, "index[%d] is out of range of op_name_ size[%d].", index, op_name_.size()); |
|
|
|
return ACL_ERROR_GE_PARAM_INVALID; |
|
|
@@ -300,6 +301,36 @@ Status DynamicSingleOp::ExecuteTbeTask(const vector<GeTensorDesc> &input_desc, |
|
|
|
return op_task_->LaunchKernel(inputs, outputs, workspace_buffers, stream_); |
|
|
|
} |
|
|
|
|
|
|
|
Status DynamicSingleOp::ProfilingTaskInfo() { |
|
|
|
if (!ProfilingManager::Instance().ProfilingModelExecuteOn()) { |
|
|
|
return SUCCESS; |
|
|
|
} |
|
|
|
GELOGD("ProfilingReport of op[%s] model[%s] start.", op_name_.c_str(), model_name_.c_str()); |
|
|
|
std::vector<TaskDescInfo> task_desc_info; |
|
|
|
uint32_t task_id = 0; |
|
|
|
uint32_t stream_id = 0; |
|
|
|
if (rtGetTaskIdAndStreamID(&task_id, &stream_id) != RT_ERROR_NONE) { |
|
|
|
GELOGE(ACL_ERROR_GE_PARAM_INVALID, "Get task_id and stream_id failed."); |
|
|
|
return ACL_ERROR_GE_PARAM_INVALID; |
|
|
|
} |
|
|
|
|
|
|
|
TaskDescInfo tmp_task_desc_info; |
|
|
|
tmp_task_desc_info.model_name = model_name_; |
|
|
|
tmp_task_desc_info.op_name = op_name_; |
|
|
|
tmp_task_desc_info.block_dim = 0; |
|
|
|
tmp_task_desc_info.task_id = task_id; |
|
|
|
tmp_task_desc_info.stream_id = stream_id; |
|
|
|
GELOGD("GetTaskDescInfo of op [%s] end, task_id[%u], stream_id[%u]", op_name_.c_str(), task_id, stream_id); |
|
|
|
task_desc_info.emplace_back(tmp_task_desc_info); |
|
|
|
|
|
|
|
std::vector<ComputeGraphDescInfo> compute_graph_info; |
|
|
|
|
|
|
|
auto &profiling_manager = ProfilingManager::Instance(); |
|
|
|
profiling_manager.ReportProfilingData(model_id_, task_desc_info, compute_graph_info, |
|
|
|
!profiling_manager.IsAclApiMode()); |
|
|
|
return SUCCESS; |
|
|
|
} |
|
|
|
|
|
|
|
Status DynamicSingleOp::ExecuteAsync(const vector<GeTensorDesc> &input_desc, |
|
|
|
const vector<DataBuffer> &input_buffers, |
|
|
|
vector<GeTensorDesc> &output_desc, |
|
|
|