diff --git a/ge/single_op/single_op_model.cc b/ge/single_op/single_op_model.cc index 9a52a83d..8d89d0c9 100755 --- a/ge/single_op/single_op_model.cc +++ b/ge/single_op/single_op_model.cc @@ -455,7 +455,7 @@ Status SingleOpModel::BuildKernelExTask(const domi::KernelExDef &kernel_def, AiC return SUCCESS; } -Status SingleOpModel::BuildCpuKernelTask(const domi::KernelDef &kernel_def, OpTask **task, uint64_t kernel_id) { +Status SingleOpModel::BuildCpuKernelTask(const domi::KernelDef &kernel_def, AiCpuCCTask **task, uint64_t kernel_id) { const auto &context = kernel_def.context(); auto iter = op_list_.find(context.op_index()); if (iter == op_list_.end()) { @@ -552,10 +552,19 @@ Status SingleOpModel::BuildTaskListForDynamicOp(StreamResource *stream_resource, auto task_type = static_cast(task_def.type()); if (task_type == RT_MODEL_TASK_KERNEL) { GELOGD("Building AICPU_CC task"); - OpTask *task = nullptr; + AiCpuCCTask *task = nullptr; uint64_t dynamic_singleop_kernel_id = aicpu_kernel_id++; GELOGI("Build dynamic singleOp CCTask, kernel_id = %lu", dynamic_singleop_kernel_id); GE_CHK_STATUS_RET_NOLOG(BuildCpuKernelTask(task_def.kernel(), &task, dynamic_singleop_kernel_id)); + if (task->GetUnknownType() == DEPEND_COMPUTE) { + if (aicpu_tasks_.size() < 2) { + GELOGE(ACL_ERROR_GE_PARAM_INVALID, "[Check][Task]The copy task of the fourth operator was not found."); + REPORT_INNER_ERROR("E19999", "The copy task of the fourth operator was not found."); + return ACL_ERROR_GE_PARAM_INVALID; + } + const TaskDef ©_task_def = aicpu_tasks_[1]; + GE_CHK_STATUS_RET_NOLOG(task->SetMemCopyTask(copy_task_def.kernel())); + } task->SetModelArgs(model_name_, model_id_); single_op.op_task_.reset(task); } else if (task_type == RT_MODEL_TASK_KERNEL_EX) { diff --git a/ge/single_op/single_op_model.h b/ge/single_op/single_op_model.h index 45616d9a..c3060115 100755 --- a/ge/single_op/single_op_model.h +++ b/ge/single_op/single_op_model.h @@ -70,7 +70,7 @@ class SingleOpModel { Status BuildTaskListForDynamicOp(StreamResource *stream_resource, DynamicSingleOp &dynamic_single_op); Status BuildKernelTask(const domi::TaskDef &task_def, TbeOpTask **task); Status BuildKernelExTask(const domi::KernelExDef &kernel_def, AiCpuTask **task, uint64_t kernel_id); - Status BuildCpuKernelTask(const domi::KernelDef &kernel_def, OpTask **task, uint64_t kernel_id); + Status BuildCpuKernelTask(const domi::KernelDef &kernel_def, AiCpuCCTask **task, uint64_t kernel_id); static void ParseOpModelParams(ModelHelper &model_helper, SingleOpModelParam ¶m); void ParseArgTable(OpTask *task, SingleOp &op);