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

#### 函数功能

设置Tensor描述信息，用于构造TilingParseContext的基类ExtendedKernelContext中的ComputeNodeInfo等信息。


#### 函数原型

```
OpTilingParseContextBuilder &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，默认值为{}。 |


#### 返回值说明

OpTilingParseContextBuilder对象本身，用于链式调用。


#### 约束说明

在调用Build方法之前，必须调用InputTensorDesc设置Tensor描述信息，否则构造出的TilingParserContext将包含未定义数据。
