CreateFusionTask
Function Usage
Creates a fusion task. Currently, an AI Core task and a CCU task can form a fusion task.
Prototype
1 | static KernelLaunchInfo CreateFusionTask(const gert::ExeResGenerationContext *context, const std::vector<KernelLaunchInfo>& sub_tasks) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
context |
Input |
Input parameter of the GenerateTask function, which stores the basic information about the operator. |
sub_tasks |
Input |
KernelLaunchInfo sequence, including KernelLaunchInfo of the AI Core and CCU types. |
Returns
Information about the created fusion task.
Constraints
Currently, sub_tasks supports only the sequence combination of AI Core tasks and CCU tasks.
Examples
1 2 3 4 5 6 7 8 | graphStatus Mc2GenTaskCallback(const gert::ExeResGenerationContext *context, std::vector<std::vector<uint8_t>> &tasks) { ... // Create the sub_tasks sequence of the CCU task and AI Core task. std::vector<ge::KernelLaunchInfo> sub_tasks= {CcuTask, AicoreTask}; ge::KernelLaunchInfo fusionTask = ge::KernelLaunchInfo::CreateFusionTask(context, sub_tasks); ... } |
Parent topic: KernelLaunchInfo