CreatePassFn

Applicability

Product

Supported or Not

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Header File/Library File

  • Header file: #include <ge/fusion/pass/fusion_pass_reg.h>
  • Library file: libge_compiler.so

Function Usage

Creates a registration function for the fusion pass.

Prototype

1
FusionPassRegistrationData &CreatePassFn(const CreateFusionPassFn &create_fusion_pass_fn)

Parameters

Parameter

Input/Output

Description

create_fusion_pass_fn

Input

Execution function of the customized pass.

Returns

Reference to FusionPassRegistrationData, which is used to call its member functions in cascading mode.

Constraints

None

Callback Function CreateFusionPassFn

A user customizes a fusion pass subclass and calls the registration macro.

REG_DECOMPOSE_PASS/
REG_FUSION_PASS

The registration macro automatically generates the callback function CreateFusionPassFn for constructing fusion pass subclass objects. This callback function is used to construct a pass object before executing the pass.

using CreateFusionPassFn = FusionBasePass *(*)();