CreatePassFn

Applicable Products

All processors

Header File/Library File

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

Function Usage

Creates the registration function for a 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 a custom pass.

Returns

Reference to FusionPassRegistrationData for cascading calls to its member functions.

Restrictions

None

Callback Function CreateFusionPassFn

A user implements a custom 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 pass execution.

using CreateFusionPassFn = FusionBasePass *(*)();