---
title: OpType
description: "设置算子类型，用于构造各子类Context的基类ExtendedKernelContext中ComputeNodeInfo信息。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/basicdataapi/atlasopapi_07_00601.html
sourcePath: /source/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00601.html
indexId: 72092f424ae7d92d1ac15c0ee130d3b309f2689c7632d0235c627a8331ba6c9678
---
# OpType

#### 函数功能

设置算子类型，用于构造各子类Context的基类ExtendedKernelContext中ComputeNodeInfo信息。


#### 函数原型

```
T &OpType(const ge::AscendString &op_type)
```


#### 参数说明

| 参数 | 输入/输出 | 说明 |
| --- | --- | --- |
| op\_type | 输入 | 算子类型。 |


#### 返回值说明

返回子类对象T类型的引用，用于支持子类链式调用。


#### 约束说明

无
