Registering a Fusion Pattern
This includes registering its name and class and setting whether a fusion pattern is common or customized.
Register a scope fusion pattern with GE by referring to REGISTER_SCOPE_FUSION_PASS, for example:
REGISTER_SCOPE_FUSION_PASS("DecodeBboxV2ScopeFusionPass", DecodeBboxV2ScopeFusionPass, false);
- The first parameter indicates the fusion pattern name.
- The second parameter indicates the fusion pattern class.
- The third parameter is is_general.
- If the value is true, the pattern is a general pattern and enabled by default.
- If the value is false, the pattern is a non-general pattern and disabled by default. You need to set the enable_scope_fusion_passes parameter during graph compilation to enable the pattern.
Parent topic: Implementing Scope Fusion Patterns