---
title: ScopeFusionPassRegistrar构造函数和析构函数
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/TensorFlowCommercial/latest/Convergence/tfscopedevg/atlassfpapi_07_0197.html
sourcePath: /source/zh/TensorFlowCommercial/900/Convergence/tfscopedevg/atlassfpapi_07_0197.html
indexId: 1e007d4b972b2d3fad714b10b4732e8681bf354a88e6a8ba976dce3de61f91f684
---
# ScopeFusionPassRegistrar构造函数和析构函数

#### 产品支持情况

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


#### 函数功能

ScopeFusionPassRegistrar构造函数和析构函数。


#### 函数原型

```
ScopeFusionPassRegistrar(const char_t *pass_name, ScopeBasePass *(*create_fn)(), bool is_general);
~ScopeFusionPassRegistrar() = default;
```


#### 参数说明

| 参数名 | 输入/输出 | 描述 |
| --- | --- | --- |
| pass\_name | 输入 | 融合算子名称 |
| create\_fn | 输入 | 返回融合算子对象的函数指针 |
| is\_general | 输入 | true：通用规则，默认生效 false：定制化规则，默认不生效 |


#### 返回值

ScopeFusionPassRegistrar构造函数返回ScopeFusionPassRegistrar类型的对象。


#### 异常处理

无。


#### 约束说明

REGISTER_SCOPE_FUSION_PASS内部调用，用户不直接调用。
