ReportFuse
Applicable Products
All processors
Header File/Library File
- Header file: #include <ge/fusion/graph_fuse_inspector_utils.h>
- Library file: libgraph_base.so
Function Usage
Reports the fusion result. After the graph is modified, the fusion result needs to be reported to update the graph connection matrix and record maintenance and test information.
The internal logic of the API is as follows:
- The opdesc of the newly fused node records the pass name.
- Update the connection matrix used for cycle detection in CanFuse.
- Record the number of matches and the number of effective fusions, and persist this information to fusion_result.json.
Prototype
1 | static Status ReportFuse(const std::vector<GNode> &nodes_before_fuse, const std::vector<GNode> &nodes_after_fuse, CustomPassContext &ctx) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
nodes_before_fuse |
Input |
List of nodes before fusion (all nodes in the list must be connected). |
nodes_after_fuse |
Input |
List of new nodes after fusion (all nodes in the list must be connected). If nodes_after_fuse is left empty, it indicates that nodes are deleted but not added. |
ctx |
Input |
Pass context. Use ctx.GetPassName() to record the pass name. |
Returns
Parameter |
Type |
Description |
|---|---|---|
- |
Status |
SUCCESS: The reporting is successful. FAILED: The reporting fails. |
Restrictions
This API must be called after the graph is modified and before the node is released or deleted.