mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
when a tensor has unbacked symbols it can be general enough to represent both contiguous and non contiguous tensors. in that case we cant really evaluate is_contiguous. In many places in the code base, we check for is_contiguous to take a fast path. but the general path usually works for both contiguous and not contiguous in that case we probably want to use definitely _contiguous API. This is appleid for reshape in this PR and also to tensor meta data computation, the meta data now will have an attribute that says that its contiguous when its always contiguous. We would store that only if definitely _contiguous is true now. Pull Request resolved: https://github.com/pytorch/pytorch/pull/153432 Approved by: https://github.com/bobrenjc93 |
||
|---|---|---|
| .. | ||
| 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
- common - common passes that can be shared by all dialects
- backends - Backend specific passes
- conversion - Conversion passes between dialects