CreateHiddenInput

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

Header File/Library File

  • Header file: #include <graph/arg_desc_info.h>
  • Library file: libgraph.so

Function Usage

Creates an ArgDescInfo object of the kHiddenInput type (an input address that does not exist in the IR prototype definition), indicating that the Args address is a HiddenInput address.

Prototype

1
static ArgDescInfo CreateHiddenInput(HiddenInputSubType hidden_type)

Parameters

Parameter

Input/Output

Description

hidden_type

Input

HiddenInput type, which is HiddenInputSubType.

Returns

ArgDescInfo object of the kHiddenInput type.

Restrictions

None

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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;
  // Create a HiddenInput address of the Hcom type.
  aicpu_args_format.emplace_back(ArgDescInfo::CreateHiddenInput(HiddenInputSubType::kHcom));
...
}