pytorch/torch/fx/passes
Jon Chuang 79212430df feat(inductor): fx graph debug should display device (#110346)
Device mismatch issues are root cause of: https://github.com/pytorch/pytorch/issues/107006, hence make device-related scheduling issues easier to diagnose.
Also format single-kwarg graphs to be more concise

Example rendering:
![image](https://github.com/pytorch/pytorch/assets/9093549/1b59a994-f2df-45c9-8cb7-37eb3ba12654)

CC code owners: @ngimel @jansel @shunting314 @mlazos @peterbell10

Pull Request resolved: https://github.com/pytorch/pytorch/pull/110346
Approved by: https://github.com/eellison
2023-10-11 00:34:55 +00:00
..
backends
dialect
infra [Reland] Update mypy to 1.4.1 (#105227) 2023-07-15 20:30:20 +00:00
tests
utils [fx][subgraph_matcher] Add a matcher that supports name to node map (#110743) 2023-10-10 22:21:24 +00:00
__init__.py
annotate_getitem_nodes.py Fix S367052 to unblock ICVR MC3 (#109853) 2023-09-23 00:23:42 +00:00
fake_tensor_prop.py Always create ShapeEnv, always apply unspec logic (#103302) 2023-06-12 12:48:28 +00:00
graph_drawer.py feat(inductor): fx graph debug should display device (#110346) 2023-10-11 00:34:55 +00:00
graph_manipulation.py
net_min_base.py [minimizer]skip mode for minimizer (#109399) 2023-09-20 06:23:46 +00:00
operator_support.py
param_fetch.py
pass_manager.py [Reland] Update mypy to 1.4.1 (#105227) 2023-07-15 20:30:20 +00:00
README.md
reinplace.py [fx] change from #users to num_users in graph printout (#101140) 2023-06-20 21:24:32 +00:00
shape_prop.py Enable Python dispatcher when ShapeProp with fake mode (#103512) 2023-06-13 17:47:33 +00:00
split_module.py Fix split module interaction with dead code (#104554) 2023-08-03 21:36:35 +00:00
split_utils.py Back out "Revert D49107540: [pytorch][PR] split by tag" (#109332) 2023-09-16 05:29:16 +00:00
splitter_base.py
tools_common.py [BE]: Update Ruff to 0.0.280 (#105724) 2023-07-22 23:03:34 +00:00

FX Pass Infrastructure

This folder contains the pass infrastructure and passes for transforming fx.Graph.

Code Structure

  • infra - Common infrastructure, such as PassManager, PassBase
  • utils - Utility classes and functions
    • common.py - common utility functions
    • fuser_utis.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
    • aten - aten dialect specific passes
    • prims - prim dialect specific passes
  • backends - Backend specific passes
  • conversion - Conversion passes between dialects