pytorch/torchgen/executorch/api
Larry Liu 7568484d54 [torchgen] Add CI job to cover custom ops registration for Executorch (#91291)
As titled. To register a custom op into Executorch, we need:

* `custom_ops.yaml`, defines the operator schema and the corresponding native function.
* `custom_ops.cpp`, defines the kernel.
* `RegisterDispatchKeyCustomOps.cpp`, a template to register operator into PyTorch.

Added a new test for custom ops. The custom op `custom::add_3.out` takes 3 tensors and add them together. The test makes sure it is registered correctly and then verifies the outcome is correct.

Differential Revision: [D42204263](https://our.internmc.facebook.com/intern/diff/D42204263/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/91291
Approved by: https://github.com/ezyang
2023-01-14 02:30:54 +00:00
..
types [torchgen] Introduce Executorch types and signatures (#90781) 2022-12-14 20:13:04 +00:00
__init__.py [torchgen] Introduce Executorch types and signatures (#90781) 2022-12-14 20:13:04 +00:00
custom_ops.py [torchgen] Add CI job to cover custom ops registration for Executorch (#91291) 2023-01-14 02:30:54 +00:00
et_cpp.py [torchgen] Introduce Executorch types and signatures (#90781) 2022-12-14 20:13:04 +00:00
unboxing.py [torchgen] Move Executorch unboxing logic into torchgen (#90098) 2022-12-19 21:58:43 +00:00