Run
Applicability
Product |
Supported or Not |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Header File/Library File
- Header file: #include <ge/fusion/pass/pattern_fusion_pass.h>
- Library file: libge_compiler.so
Function Usage
Main pass function.
The function obtains the pattern graph constructed by PatternGraphs and uses it to build a pattern.
It then performs one-by-one matching on the target graph and invokes the Requires function to determine whether each match is eligible for replacement. If a match meets the replacement criteria (the value true is returned), the function further proceeds with the replacement.
It calls Replacement to obtain the target structure and replaces the matched subgraph in the matching results with the target subgraph.
Note: The Run function can be used to process only the current graph. If a subgraph needs to be processed, the pass caller is responsible for processing the subgraph.
Prototype
1 | Status Run(GraphPtr &graph, CustomPassContext &pass_context) override |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
graph |
Input |
Target graph. |
pass_context |
Input |
Context, which can be used to transfer information such as error messages. |
Returns
Parameter |
Type |
Description |
|---|---|---|
- |
Status |
SUCCESS: Execution succeeded. FAILED: Execution failed. |
Constraints
None