pytorch/torch/fx/passes
Aaron Gokaslan bbda22e648 [BE][Ez]: Optimize unnecessary lambda with operator (#154722)
Automated edits performed by FURB118. Operator is implemented in C and way faster when passed to another C method like sorted, max etc as a `key=`

Pull Request resolved: https://github.com/pytorch/pytorch/pull/154722
Approved by: https://github.com/jansel
2025-05-30 23:47:10 +00:00
..
backends
dialect PEP585 update - torch/fx (#145166) 2025-01-20 18:11:54 +00:00
infra [BE][Ez]: Optimize unnecessary lambda with operator (#154722) 2025-05-30 23:47:10 +00:00
tests
utils PEP585 update - torch/fx (#145166) 2025-01-20 18:11:54 +00:00
__init__.py
_tensorify_python_scalars.py add graph_code_verbose_log artifact for fx passes (#153775) 2025-05-21 18:31:59 +00:00
annotate_getitem_nodes.py [4/N] Apply py39 ruff and pyupgrade fixes (#143257) 2025-01-04 10:47:51 +00:00
fake_tensor_prop.py [invoke_subgraph] Run missing graph passes recursively (#152675) 2025-05-06 02:55:34 +00:00
graph_drawer.py Update to using mypy 1.15 (#154054) 2025-05-24 04:30:57 +00:00
graph_manipulation.py PEP585 update - torch/fx (#145166) 2025-01-20 18:11:54 +00:00
graph_transform_observer.py PEP585 update - torch/fx (#145166) 2025-01-20 18:11:54 +00:00
net_min_base.py [Minimizer] Gracefully exit when there is no discrepancy in block mode (#154076) 2025-05-23 06:42:07 +00:00
operator_support.py PEP585 update - torch/fx (#145166) 2025-01-20 18:11:54 +00:00
param_fetch.py PEP585 update - torch/fx (#145166) 2025-01-20 18:11:54 +00:00
pass_manager.py PEP585 update - torch/fx (#145166) 2025-01-20 18:11:54 +00:00
README.md Fix xrefs (#151888) 2025-04-25 21:27:27 +00:00
reinplace.py Revert "Improve torch.ops typing (#153558)" 2025-05-19 23:32:36 +00:00
runtime_assert.py Fix: Replacements can cause runtime assertions to disappear and can cause invalid inductor code. (#153661) 2025-05-28 09:08:05 +00:00
shape_prop.py introduce definitely_contiguous and use it for reshape and tensor meta data computation. (#153432) 2025-05-28 03:41:26 +00:00
split_module.py PEP585 update - torch/fx (#145166) 2025-01-20 18:11:54 +00:00
split_utils.py [Minimizer] allow overriding of ShapeProp logic by subclasses of _MinimizerBase (#148784) 2025-03-10 22:22:16 +00:00
splitter_base.py Update to using mypy 1.15 (#154054) 2025-05-24 04:30:57 +00:00
tools_common.py PEP585 update - torch/fx (#145166) 2025-01-20 18:11:54 +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_utils.py - utility functions for fusing list of nodes into a single node
  • dialect - dialect specific passes
  • backends - Backend specific passes
  • conversion - Conversion passes between dialects