mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
This enables a check that which a class which only inherits from immutable classes like str, tuple, and NamedTuple, also defined `__slots__` so they don't allocate memory unnecessarily. This also ensure contributors think about how they define their classes with subclass NamedTuples and str, of which we have many in our codebase Pull Request resolved: https://github.com/pytorch/pytorch/pull/146276 Approved by: https://github.com/aorenste |
||
|---|---|---|
| .. | ||
| backends | ||
| dialect | ||
| infra | ||
| tests | ||
| utils | ||
| __init__.py | ||
| _tensorify_python_scalars.py | ||
| annotate_getitem_nodes.py | ||
| fake_tensor_prop.py | ||
| graph_drawer.py | ||
| graph_manipulation.py | ||
| graph_transform_observer.py | ||
| net_min_base.py | ||
| operator_support.py | ||
| param_fetch.py | ||
| pass_manager.py | ||
| README.md | ||
| reinplace.py | ||
| runtime_assert.py | ||
| shape_prop.py | ||
| split_module.py | ||
| split_utils.py | ||
| splitter_base.py | ||
| tools_common.py | ||
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
- aten - aten dialect specific passes
- prims - prim dialect specific passes
- common - common passes that can be shared by all dialects
- backends - Backend specific passes
- nvfuser - passes for nvfuser
- operator_support.py - nvFuser supported ops
- nvfuser - passes for nvfuser
- conversion - Conversion passes between dialects