---
title: InputTensorDesc
description: "设置输入Tensor的描述信息，用于构造InferDataTypeContext的基类ExtendedKernelContext中的ComputeNodeInfo信息。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/basicdataapi/atlasopapi_07_00609.html
sourcePath: /source/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00609.html
indexId: 5d63fa413bb835fe811573196f9cbfdef1e9ce423866cc8da3be61f109891f8178
---
# InputTensorDesc

#### 函数功能

设置输入Tensor的描述信息，用于构造InferDataTypeContext的基类ExtendedKernelContext中的ComputeNodeInfo信息。


#### 函数原型

```
OpInferDataTypeContextBuilder &InputTensorDesc(size_t index, ge::DataType dtype, ge::Format origin_format, ge::Format storage_format, const gert::ExpandDimsType &expand_dims_type = {})
```


#### 参数说明

| 参数 | 输入/输出 | 说明 |
| --- | --- | --- |
| index | 输入 | 算子输入实例索引。 |
| dtype | 输入 | 输入Tensor的数据类型。 |
| origin\_format | 输入 | 输入Tensor的原始格式。 |
| storage\_format | 输入 | 输入Tensor的存储格式。 |
| expand\_dims\_type | 输入 | 输入Tensor的补维规则ExpandDimsType，默认值为{}。 |


#### 返回值说明

OpInferDataTypeContextBuilder对象引用，用于链式调用。


#### 约束说明

在调用Build方法之前，必须调用该接口，否则构造出的InferDataTypeContext将包含未定义数据。
