REGISTER_CUSTOM_PASS
Applicability
Product |
Supported or Not |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Header File/Library File
- Header file: #include <register/register_custom_pass.h>
- Library file: libregister.so
Function Usage
Developers can register the graph modification function with the framework. The framework calls the custom graph modification pass at the beginning of build and calls REGISTER_CUSTOM_PASS to register the custom pass.
Prototype
1 | REGISTER_CUSTOM_PASS(name) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
name |
Input |
Name of a custom pass. |
Returns
None
Constraints
The call starts with REGISTER_CUSTOM_PASS and uses periods (.) to connect APIs such as CustomPassFn. Example:
1 2 | #include "register/register_custom_pass.h" REGISTER_CUSTOM_PASS("pass_name").CustomPassFn(CustomPassFunc); |
Parent topic: Data Structures and APIs