---
title: SetNodeType
description: "设置算子的类型。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/basicdataapi/atlasopapi_07_00040.html
sourcePath: /source/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00040.html
indexId: bbf9ecc53f97ac0c3776bb2cfd34fd16de479fbb9f52f12a217e7c91656f855878
---
# SetNodeType

#### 函数功能

设置算子的类型。


#### 函数原型

```
void SetNodeType(const ge::char_t *node_type)
```


#### 参数说明

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


#### 返回值说明

无。


#### 约束说明

无。


#### 调用示例

```
compute_node_info.SetNodeType("Const");
```
