---
title: CreateHiddenInput
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendgraphapi/atlasgeapi_07_0293.html
sourcePath: /source/zh/canncommercial/900/API/ascendgraphapi/atlasgeapi_07_0293.html
indexId: e35be22332d2a703b80b4912bb307ab4927c84319f3d72274fc295995df3e92672
---
# CreateHiddenInput

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |


#### 头文件/库文件

- 头文件：#include <graph/arg_desc_info.h>
- 库文件：libgraph.so


#### 功能说明

创建一个类型为kHiddenInput（在IR原型定义上不存在的输入地址）的ArgDescInfo对象，表示此块Args地址为HiddenInput地址。


#### 函数原型

```
static ArgDescInfo CreateHiddenInput(HiddenInputSubType hidden_type)
```


#### 参数说明

| 参数 | 输入/输出 | 说明 |
| --- | --- | --- |
| hidden\_type | 输入 | HiddenInput的类型。HiddenInputSubType类型。 |


#### 返回值说明

返回一个ArgDescInfo对象，此对象的type为kHiddenInput。


#### 约束说明

无


#### 调用示例

```
graphStatus Mc2GenTaskCallback(const gert::ExeResGenerationContext *context,
    std::vector<std::vector<uint8_t>> &tasks) {
  // 设置AI CPU任务
  auto aicpu_task = KernelLaunchInfo::CreateAicpuKfcTask(context,
      "libccl_kernel.so", "RunAicpuKfcSrvLaunch");
  std::vector<ArgDescInfo> aicpu_args_format;
  // 创建一个类型是Hcom的HiddenInput地址
  aicpu_args_format.emplace_back(ArgDescInfo::CreateHiddenInput(HiddenInputSubType::kHcom));
}
```
