SetFolded
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Header File/Library File
- Header file: #include <graph/arg_desc_info.h>
- Library file: libgraph.so
Function Usage
Sets whether the current address needs to be folded into a level-2 pointer.
Prototype
1 | void SetFolded(bool is_folded) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
is_folded |
Input |
Information about whether the address needs to be folded into a level-2 pointer. |
Returns
None
Restrictions
None
Example
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::kIrOutputDesc, 0)); // Set the address to be folded into a level-2 pointer. aicpu_args_format.back().SetFolded(true); ... } |
Parent topic: ArgDescInfo