xref: /aosp_15_r20/external/pytorch/torch/fx/passes/README.md (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1## FX Pass Infrastructure
2This folder contains the pass infrastructure and passes for transforming fx.Graph.
3
4
5## Code Structure
6
7* [infra](infra) - Common infrastructure, such as PassManager, PassBase
8    * [partitioner.py](infra/partitioner.py) - backend agnostic FX graph partitioner
9* [utils](utils) - Utility classes and functions
10    * [common.py](utils/common.py) - common utility functions
11    * [fuser_utils.py](utils/fuser_utils.py) - utility functions for fusing list of nodes into a single node
12* [dialect](dialect) - dialect specific passes
13    * [common](dialect/common) - common passes that can be shared by all dialects
14        * [cse_pass.py](dialect/common/cse_pass.py) - a CSE pass
15    * [aten](dialect/aten) - aten dialect specific passes
16    * [prims](dialect/prims) - prim dialect specific passes
17* [backends](backends) - Backend specific passes
18    * [nvfuser](backends/nvfuser) - passes for nvfuser
19        * [operator_support.py](backends/nvfuser/operator_support.py) - nvFuser supported ops
20* [conversion](conversion) - Conversion passes between dialects
21