SetIrIndex
Applicability
Product |
Supported or Not |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Header File
#include <graph/arg_desc_info.h>
Function Usage
Sets the IR index of the current ArgDescInfo. The setting is successful only when type is kIrInput, kIrOutput, kIrInputDesc, or kIrOutputDesc.
Prototype
1 | void SetIrIndex(int32_t ir_index) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
ir_index |
Input |
Input/output IR index. |
Returns
None
Constraints
None
Examples
1 2 3 4 5 6 7 8 9 10 11 12 | graphStatus Mc2GenTaskCallback(const gert::ExeResGenerationContext *context, std::vector<std::vector<uint8_t>> &tasks) { ... // Set an AI CPU task. auto aicpu_task = KernelLaunchInfo::CreateAicpuKfcTask(context, "libccl_kernel.so", "RunAicpuKfcSrvLaunch"); std::vector<ArgDescInfo> aicpu_args_format; aicpu_args_format.emplace_back(ArgDescInfo(ArgDescType::kIrOutput)); //Set the IR index to 0. aicpu_args_format.back().SetIrIndex(0); ... } |
Parent topic: ArgDescInfo