---
title: REGISTER_CUSTOM_PASS
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendgraphapi/atlasgeapi_07_0388.html
sourcePath: /source/zh/canncommercial/900/API/ascendgraphapi/atlasgeapi_07_0388.html
indexId: 464518837d53f43da1ac72c0129ac9fe5e8d8fe71adb84029e4d53cf233865c172
---
# REGISTER_CUSTOM_PASS

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |


#### 头文件

#include <register/register_custom_pass.h>


#### 功能说明

开发人员可以选择将改图函数注册到框架中，由框架在编译最开始调用自定义改图Pass，调用REGISTER_CUSTOM_PASS进行自定义Pass注册。


#### 函数原型

```
REGISTER_CUSTOM_PASS(name)
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| name | 输入 | 自定义Pass的名称。 |


#### 返回值说明

无


#### 约束说明

调用时以REGISTER_CUSTOM_PASS开始，以“.”连接CustomPassFn等接口。例如：

```
#include "register/register_custom_pass.h"
REGISTER_CUSTOM_PASS("pass_name").CustomPassFn(CustomPassFunc);
```
