| @@ -216,7 +216,7 @@ Status AiCoreNodeTask::ExecuteAsync(TaskContext &context, std::function<void()> | |||||
| RECORD_EXECUTION_EVENT(context.GetExecutionContext(), context.GetNodeName(), "[AiCoreNodeLaunchKernel] End"); | RECORD_EXECUTION_EVENT(context.GetExecutionContext(), context.GetNodeName(), "[AiCoreNodeLaunchKernel] End"); | ||||
| } | } | ||||
| if (done_callback != nullptr && !is_single_op_) { | |||||
| if (done_callback != nullptr) { | |||||
| RECORD_EXECUTION_EVENT(context.GetExecutionContext(), context.GetNodeName(), "[AiCoreNodeRegisterCallback] Start"); | RECORD_EXECUTION_EVENT(context.GetExecutionContext(), context.GetNodeName(), "[AiCoreNodeRegisterCallback] Start"); | ||||
| GE_CHK_STATUS_RET_NOLOG(context.RegisterCallback(done_callback)); | GE_CHK_STATUS_RET_NOLOG(context.RegisterCallback(done_callback)); | ||||
| RECORD_EXECUTION_EVENT(context.GetExecutionContext(), context.GetNodeName(), "[AiCoreNodeRegisterCallback] End"); | RECORD_EXECUTION_EVENT(context.GetExecutionContext(), context.GetNodeName(), "[AiCoreNodeRegisterCallback] End"); | ||||
| @@ -61,12 +61,10 @@ class AiCoreNodeTask : public NodeTask { | |||||
| const vector<int64_t> &GetWorkspaceSizes() const; | const vector<int64_t> &GetWorkspaceSizes() const; | ||||
| void SetWorkspaceSizes(const vector<int64_t> &workspace_sizes); | void SetWorkspaceSizes(const vector<int64_t> &workspace_sizes); | ||||
| void SetSingleOp(bool is_single_op) {is_single_op_ = is_single_op;} | |||||
| private: | private: | ||||
| Status CheckOverflow(TaskContext &context); | Status CheckOverflow(TaskContext &context); | ||||
| std::vector<std::unique_ptr<AiCoreOpTask>> tasks_; | std::vector<std::unique_ptr<AiCoreOpTask>> tasks_; | ||||
| std::vector<int64_t> workspace_sizes_; | std::vector<int64_t> workspace_sizes_; | ||||
| bool is_single_op_ = false; | |||||
| }; | }; | ||||
| class AiCoreNodeExecutor : public NodeExecutor { | class AiCoreNodeExecutor : public NodeExecutor { | ||||
| @@ -88,7 +88,6 @@ Status AiCoreTaskBuilder::BuildTask(std::unique_ptr<AiCoreNodeTask> &node_task, | |||||
| node_task.reset(new(std::nothrow)AiCoreNodeTask(std::move(op_tasks))); | node_task.reset(new(std::nothrow)AiCoreNodeTask(std::move(op_tasks))); | ||||
| GE_CHECK_NOTNULL(node_task); | GE_CHECK_NOTNULL(node_task); | ||||
| node_task->SetSingleOp(is_single_op); | |||||
| return SUCCESS; | return SUCCESS; | ||||
| } | } | ||||