torch-mlir/python/torch_mlir_e2e_test/torchscript
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
..
configs Bring some more order to the e2e error reporting situation. 2021-10-08 13:00:12 -07:00
CMakeLists.txt Move external/torch-mlir to the root of the repo. 2021-09-27 17:11:08 -07:00
__init__.py Move external/torch-mlir to the root of the repo. 2021-09-27 17:11:08 -07:00
annotations.py Dual license the torch-mlir project. 2021-10-01 10:46:08 -07:00
framework.py Add min/max/clamp support. 2021-10-27 13:29:21 -07:00
registry.py Dual license the torch-mlir project. 2021-10-01 10:46:08 -07:00
reporting.py Introduce new shape library design. 2022-03-15 12:41:58 -07:00