mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
This is follow-up of #164653 to continue applying `UP035` fixes. The purpose is to finally enable this rule. Pull Request resolved: https://github.com/pytorch/pytorch/pull/165214 Approved by: https://github.com/ezyang
FX Pass Infrastructure
This folder contains the pass infrastructure and passes for transforming fx.Graph.
Code Structure
- infra - Common infrastructure, such as PassManager, PassBase
- partitioner.py - backend agnostic FX graph partitioner
- utils - Utility classes and functions
- common.py - common utility functions
- fuser_utils.py - utility functions for fusing list of nodes into a single node
- dialect - dialect specific passes
- common - common passes that can be shared by all dialects
- cse_pass.py - a CSE pass
- common - common passes that can be shared by all dialects
- backends - Backend specific passes
- conversion - Conversion passes between dialects