Browse Source

Feature: Support single op profiling

pull/473/head
l00444296 4 years ago
parent
commit
e98e11207f
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      ge/single_op/single_op.cc

+ 10
- 2
ge/single_op/single_op.cc View File

@@ -349,9 +349,17 @@ Status DynamicSingleOp::ExecuteAsync(const vector<GeTensorDesc> &input_desc,
} }


if (op_task_->GetOpTaskType() == OP_TASK_TBE) { if (op_task_->GetOpTaskType() == OP_TASK_TBE) {
return ExecuteTbeTask(input_desc, inputs, output_desc, outputs);
auto ret = ExecuteTbeTask(input_desc, inputs, output_desc, outputs);
if (ret == SUCCESS) {
GE_CHK_STATUS_RET_NOLOG(ProfilingTaskInfo());
}
return ret;
} else if (op_task_->GetOpTaskType() == OP_TASK_AICPU || op_task_->GetOpTaskType() == OP_TASK_AICPUCC) { } else if (op_task_->GetOpTaskType() == OP_TASK_AICPU || op_task_->GetOpTaskType() == OP_TASK_AICPUCC) {
return op_task_->LaunchKernel(input_desc, input_buffers, output_desc, output_buffers, stream_);
auto aicpu_ret = op_task_->LaunchKernel(input_desc, input_buffers, output_desc, output_buffers, stream_);
if (aicpu_ret == SUCCESS) {
GE_CHK_STATUS_RET_NOLOG(ProfilingTaskInfo());
}
return aicpu_ret;
} else { } else {
GELOGE(ACL_ERROR_GE_OP_TASK_TYPE_INVALID, GELOGE(ACL_ERROR_GE_OP_TASK_TYPE_INVALID,
"Only TBE_Task, AI_CPU_Task and AI_CPUCC_Task are supported, but got %u", "Only TBE_Task, AI_CPU_Task and AI_CPUCC_Task are supported, but got %u",


Loading…
Cancel
Save