torch-mlir/build_tools
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
..
python_deploy Build each OSX python version in an venv (#852) 2022-05-12 16:39:35 -07:00
torchscript_e2e_heavydep_tests Add simple neural_net and bert_training scripts. 2022-05-19 06:18:42 +05:30
build_python_wheels.sh Pin the Python package to the exact PyTorch nightly. 2022-04-20 16:47:38 -07:00
build_standalone.sh [NFC] Rename external -> externals (#699) 2022-03-26 09:12:27 -07:00
update_shape_lib.sh Allow torch-mlir to support PyTorch extensions. (#895) 2022-06-13 14:51:30 -07:00
update_torch_ods.sh Allow torch-mlir to support PyTorch extensions. (#895) 2022-06-13 14:51:30 -07:00
write_env_file.sh Move external/torch-mlir to the root of the repo. 2021-09-27 17:11:08 -07:00