torch-mlir/lib/Dialect/Torch/Transforms
Sean Silva a5fe0cf063 Introduce new shape library design.
See the documentation in `docs/shape_lib.md` and
`docs/adding_a_shape_function.md` for an overview of the system.

This completely overhauls how we represent shape functions. In
particular, RefineTypes does not infer shapes anymore (only dtypes).
Shape functions are now written in (TorchScript'able) Python.

Recommended review order:

1. Read `docs/shape_lib.md` and `docs/adding_a_shape_function.md`.
1. Code and tests for ReifyShapeCalculations, DropShapeCalculations.
1. Code and tests for SimplifyShapeCalculations.
1. shape_lib_gen.py
1. Code and tests for new RefineTypes pass.
1. Random folders/canonicalizers in TorchOps.cpp and associated test in
   `canonicalize.mlir`.
1. New ReadOnly trait inferred from the registry.
1. Any miscellaneous remaining stuff.

Example `-print-ir-after-all` for ElementwiseUnaryModule:
[IR lowering dump](https://gist.github.com/silvasean/e4dc8cbc8d00aac7819602e3cbd8e212).

Example `-print-ir-after-all` for ElementwiseBinaryModule:
[IR lowering dump](https://gist.github.com/silvasean/daf6860ecced732af3568af6b1899113).
2022-03-15 12:41:58 -07:00
..
AdjustCallingConventions.cpp Bump LLVM to 881ff4e4ebe8cc0cc045c7c167cffb01f94f27f8 (#539) 2022-01-25 22:16:30 -08:00
CMakeLists.txt Introduce new shape library design. 2022-03-15 12:41:58 -07:00
DecomposeComplexOps.cpp Introduce new shape library design. 2022-03-15 12:41:58 -07:00
DropShapeCalculations.cpp Introduce new shape library design. 2022-03-15 12:41:58 -07:00
GlobalizeObjectGraph.cpp Bump LLVM to 84fe34a0b7fdd7bbf179981d1583693d5d5ec68b (#544) 2022-01-27 17:21:09 -08:00
InlineGlobalSlots.cpp Dual license the torch-mlir project. 2021-10-01 10:46:08 -07:00
MaximizeValueSemantics.cpp Introduce new shape library design. 2022-03-15 12:41:58 -07:00
PassDetail.h Dual license the torch-mlir project. 2021-10-01 10:46:08 -07:00
Passes.cpp Introduce new shape library design. 2022-03-15 12:41:58 -07:00
PrepareForGlobalizeObjectGraph.cpp Dual license the torch-mlir project. 2021-10-01 10:46:08 -07:00
ReduceOpVariants.cpp [LINALG] Fix `aten.bernoulli` op lowering 2022-03-05 09:38:22 +05:30
RefinePublicReturn.cpp Introduce new shape library design. 2022-03-15 12:41:58 -07:00
RefineTypes.cpp Introduce new shape library design. 2022-03-15 12:41:58 -07:00
ReifyShapeCalculations.cpp Introduce new shape library design. 2022-03-15 12:41:58 -07:00
ShapeLibrary.cpp Introduce new shape library design. 2022-03-15 12:41:58 -07:00
SimplifyShapeCalculations.cpp Introduce new shape library design. 2022-03-15 12:41:58 -07:00