onnx_ir.passes.common¶
Built-in passes provided by the ONNX IR
See Writing transformation passes for composition and custom pass authoring, Subgraphs and functions for inlining, and Model I/O for validation workflows.
Built-in passes¶
Add default values for optional attributes that are not present in nodes. |
|
Add initializers to inputs. |
|
Run onnx checker on the model. |
|
Clear all metadata and docstring from the model, graphs, nodes, and functions. |
|
Eliminate common subexpression in ONNX graphs. |
|
Remove duplicated initializer tensors (using a hashed method) from the graph. |
|
Remove duplicated initializer tensors from the main graph and all subgraphs. |
|
Pass for eliminating redundant Identity nodes. |
|
Inline model local functions to the main graph and functions and remove unused functions. |
|
Lift constants to initializers. |
|
Lift subgraph initializers to main graph. |
|
Pass for fixing names to ensure all values and nodes have unique names. |
|
Pass for adding Identity nodes to fix invalid output configurations. |
|
Remove initializers from inputs. |
|
Pass for removing unused nodes and initializers (dead code elimination). |
|
Remove unused opset imports from the model and functions. |
|
This pass performs shape inference on the graph. |
|
Topologically sort graphs and functions in a model. |