GE DUMP
To analyze a graph, dump the graph optimized by GE by configuring related environment variables.
The involved environment variables include DUMP_GE_GRAPH, DUMP_GRAPH_LEVEL, and DUMP_GRAPH_PATH. For details, see "Graph Build" in the CANN Environment Variable Reference.
The common configuration is DUMP_GE_GRAPH=2 and DUMP_GRAPH_LEVEL=2.
In the dump graph folder, several .pbtxt/.pb files are generated in sequence after each phase of graph optimization is complete. For example, 00000101 in ge_onnx_00000101_graph_0_Build.pbtxt indicates the sequence number, and 0 in graph_0 indicates the rank ID, which is always 0 in the recommended inference scenario. The build graph corresponds to the graph in the execution phase. Use profiling to analyze the network structure corresponding to the graph and optimize the graph.
msIT: Dump the GE graph and use the msit graph function of the tool to scan the repeated structures. If a substructure is repeated for many times and occupies a large proportion, you can manually write the fusion pass and fusion operator for optimization. The tool also provides the subgraph extraction function. For example, if a graph is too large to be opened, you can extract a subgraph for analysis. The third-party network visualization tool netron.app is recommended.