torch-mlir/lib/Conversion
Bob Adolf 0a7ba62438
Allow torch-mlir to support PyTorch extensions. (#895)
PyTorch allows new operators to be registered dynamically in modules.
Torch-mlir already makes it fairly straightforward to add support for
new operators, and this commit just extends that support to allow new
PyTorch ops to come from a external module.

This does *not* allow ops to be dynamically loaded into torch-mlir.
Torch-mlir must still be compiled with support built-in.

Add a `_torch_mlir_custom_op_example` subpackage to `torch_mlir` which
registers an demonstration op. It will not be imported by default when
importing torch_mlir. It's strictly for testing and documentation.

Adds an end-to-end test for the `torch_mlir_custom_op_example::identity` op.

With all these changes, we should now be actively testing PyTorch extension
support with all future patches.
2022-06-13 14:51:30 -07:00
..
TorchToLinalg Allow torch-mlir to support PyTorch extensions. (#895) 2022-06-13 14:51:30 -07:00
TorchToSCF [TORCH][MLIR]Add lowering for control flow operations. 2022-04-29 16:25:58 +05:30
TorchToStd Add E2E support for AtenAllBoolOp (#874) 2022-06-01 18:20:25 -07:00
TorchToTMTensor llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00
TorchToTosa [tosa] Support for AtenAvgPool2d op 2022-05-27 07:56:37 +05:30
Utils [MLIR][TORCH] Add decomposition of aten.adaptive_avg_pool2d op 2022-05-27 07:56:37 +05:30
CMakeLists.txt [MLIR][TORCH] Add TorchToTMTensor pass 2022-03-08 22:52:34 +05:30
PassDetail.h llvm: bump tag to e1318078 (#781) 2022-04-26 12:27:51 -07:00
Passes.cpp [MLIR][TORCH] Add TorchToTMTensor pass 2022-03-08 22:52:34 +05:30