torch-mlir/e2e_testing/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
..
arange.py [MLIR][TORCH] Add E2E support for torch.arange op 2021-12-27 22:45:48 +05:30
argmax.py add argmax lowering 2021-10-13 14:31:16 -04:00
backprop.py Add e2e test for aten.log_softmax_back_data op 2021-11-19 00:08:28 +05:30
basic.py [MLIR][TORCH] Add TorchToTMTensor pass 2022-03-08 22:52:34 +05:30
cast.py [LINALG] Add E2E support for `aten.[Bool.Tensor|Float.Tensor]` op 2022-02-14 23:09:20 +05:30
constant_alloc.py [MLIR][TORCH] Add E2E support for aten.full_like op 2022-03-04 21:58:23 +05:30
conv.py Refine static shapes for conv2d and maxpool2d 2022-01-03 11:09:23 -06:00
elementwise.py [MLIR][TORCH] Add E2E support for aten.erf op. 2022-03-09 22:22:03 +05:30
elementwise_comparison.py [LINALG] Add E2E support for `aten.[le|ge].Scalar` ops 2022-02-15 12:21:09 +05:30
histogram_binning_calibration.py Adding an e2e test for histogram binning calibration 2022-01-25 18:27:20 -05:00
index_select.py [MLIR][TORCH] Add E2E support for aten.index_select op 2021-12-09 23:13:36 +05:30
main.py [LINALG] Add E2E support for `aten.[le|ge].Scalar` ops 2022-02-15 12:21:09 +05:30
matmul.py Add lowering of aten.matmul op. 2021-10-26 12:45:09 -04:00
mlp.py Support aten::linear with rank 3 inputs 2021-11-18 22:15:04 +05:30
nll_loss.py Add `reduction` support to `torch.nll_loss_forward` (#624) 2022-02-28 11:01:23 -08:00
norm_like.py Introduce new shape library design. 2022-03-15 12:41:58 -07:00
quantized_models.py Dual license the torch-mlir project. 2021-10-01 10:46:08 -07:00
reduction.py [MLIR][TORCH]Add support for integer-type inputs for sum and max op 2022-03-08 22:52:34 +05:30
reshape_like.py [LINALG] Add handling of unknown dimension in size list of `view` op (#633) 2022-03-02 13:35:01 -08:00
rng.py [LINALG] Fix `aten.bernoulli` op lowering 2022-03-05 09:38:22 +05:30
scalar.py add aten.sub.int/aten.mul.int lowering in TorchToStd 2021-12-17 10:35:15 -08:00
scalar_comparison.py [LINALG] Add E2E support for `aten.eq.int` op 2022-02-15 01:37:35 +05:30
slice_like.py Introduce new shape library design. 2022-03-15 12:41:58 -07:00
squeeze.py Introduce new shape library design. 2022-03-15 12:41:58 -07:00
table_batch_embedding.py [TBE] Add a test module for table batch embedding 2022-01-28 02:24:28 +05:30
threshold.py [tosa] Support for some ops and fix for Issue #532 (#575) 2022-02-11 12:30:02 -08:00
type_conversion.py Convert bool to float or integer type. 2022-02-07 21:22:22 +05:30
type_promotion.py Add scalar type promotion for mul and div (#454) 2021-12-03 13:51:25 -06:00
vision_models.py Add aten.hardtanh e2e support. 2022-03-02 12:28:06 -05:00
xfail_sets.py Add aten.hardtanh e2e support. 2022-03-02 12:28:06 -05:00