From 87b78662a27edff21175ff6849fb79f9e7dc0901 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 12 Jan 2021 16:57:37 +0800 Subject: [PATCH] Add cc_task task_info log. --- ge/single_op/task/aicpu_kernel_task_builder.cc | 4 ++++ ge/single_op/task/aicpu_task_builder.cc | 2 +- ge/single_op/task/op_task.cc | 3 ++- ge/single_op/task/op_task.h | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ge/single_op/task/aicpu_kernel_task_builder.cc b/ge/single_op/task/aicpu_kernel_task_builder.cc index 34f1ba7b..2a5f968f 100755 --- a/ge/single_op/task/aicpu_kernel_task_builder.cc +++ b/ge/single_op/task/aicpu_kernel_task_builder.cc @@ -109,6 +109,10 @@ Status AiCpuCCTaskBuilder::BuildTask(AiCpuCCTask &task, uint64_t kernel_id, cons aicpu_param_head->extInfoAddr = reinterpret_cast(task.ext_info_addr_dev_); } + task.op_type_ = op_desc_->GetName(); + task.kernel_id_ = kernel_id; + auto debug_info = BuildTaskUtils::GetTaskInfo(op_desc_); + GELOGI("[TASK_INFO] %lu/%s %s", kernel_id, task.op_type_.c_str(), debug_info.c_str()); return SUCCESS; } } // namespace ge \ No newline at end of file diff --git a/ge/single_op/task/aicpu_task_builder.cc b/ge/single_op/task/aicpu_task_builder.cc index 5fd4879e..1bfbcb3c 100755 --- a/ge/single_op/task/aicpu_task_builder.cc +++ b/ge/single_op/task/aicpu_task_builder.cc @@ -123,7 +123,7 @@ namespace ge { task.kernel_id_ = kernel_id; auto debug_info = BuildTaskUtils::GetTaskInfo(op_desc_); - GELOGI("[TASK_INFO] %s/%s %s", std::to_string(kernel_id).c_str(), task.op_type_.c_str(), debug_info.c_str()); + GELOGI("[TASK_INFO] %lu/%s %s", kernel_id, task.op_type_.c_str(), debug_info.c_str()); return SUCCESS; } } // namespace ge diff --git a/ge/single_op/task/op_task.cc b/ge/single_op/task/op_task.cc index 51c3e845..cc63e811 100755 --- a/ge/single_op/task/op_task.cc +++ b/ge/single_op/task/op_task.cc @@ -567,7 +567,7 @@ Status AiCpuTask::LaunchKernel(rtStream_t stream) { GELOGE(RT_FAILED, "Invoke rtKernelLaunch failed. ret = %d, task = %s", ret, this->op_type_.c_str()); return RT_FAILED; } - GELOGI("[TASK_INFO] %s/%s", std::to_string(kernel_id_).c_str(), op_type_.c_str()); + GELOGI("[TASK_INFO] %lu/%s", kernel_id_, op_type_.c_str()); auto status = OpenDump(stream); if (status != SUCCESS) { @@ -840,6 +840,7 @@ Status AiCpuCCTask::LaunchKernel(rtStream_t stream) { GELOGE(ret, "Invoke rtCpuKernelLaunch failed. ret = %d", ret); return ret; } + GELOGI("[TASK_INFO] %lu/%s", kernel_id_, op_type_.c_str()); GELOGD("Invoke rtCpuKernelLaunch succeeded"); auto status = OpenDump(stream); if (status != SUCCESS) { diff --git a/ge/single_op/task/op_task.h b/ge/single_op/task/op_task.h index bf78557c..2d0740a6 100644 --- a/ge/single_op/task/op_task.h +++ b/ge/single_op/task/op_task.h @@ -227,6 +227,8 @@ private: size_t io_addr_num_ = 0; bool is_custom_ = false; uint32_t dump_flag_ = RT_KERNEL_DEFAULT; + std::string op_type_; + uint64_t kernel_id_ = 0; }; } // namespace ge