昇腾社区首页
中文
注册
开发者
下载

GetHiddenInputSubType

函数功能

获取ArgDescInfo的隐藏输入地址的类型,只有type为kHiddenInput时,才能获取到正确的值。

函数原型

1
HiddenInputSubType GetHiddenInputSubType() const

参数说明

返回值说明

获取到隐藏输入地址的类型,默认值为kEnd。

约束说明

调用示例

 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) {
...
  // 设置AI CPU任务
  auto aicpu_task = KernelLaunchInfo::CreateAicpuKfcTask(context,
      "libccl_kernel.so", "RunAicpuKfcSrvLaunch");
  std::vector<ArgDescInfo> aicpu_args_format;
  aicpu_args_format.emplace_back(ArgDescInfo::CreateHiddenInput(HiddenInputSubType::kHcom));
  // 此处获取到kHcom
  uint64_t hidden_type = aicpu_args_format.back().GetHiddenInputSubType();
...
}