You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Similar to D48103652 and D48184410 but focusing on buck2 support.
This example demonstrates the ability to build a `exir_custom_ops_aot_lib` by using only C++ implementations of both functional and out variants of the custom op.
Specifically, let's assume a user has an op `my_ops::mul4` and already has a C++ implementation of it. The user registers this op through PyTorch C++ op registration API.
Now they want to run the same op on Executorch, naturally they need `my_ops::mul4.out` and a C++ implementation of it so that Executorch runtime can consume. `exir_custom_ops_aot_lib` is able to reuse this C++ impl for Executorch runtime, link it with `libtorch` and generate code to register it into PyTorch JIT runtime. This way the user doesn't have to write an extra Python impl.
This is the exact behavior demonstrated in D48184410, but instead of relying on CMake this diff enables BUCK2 targets.
Reviewed By: kimishpatel
Differential Revision: D48296936
fbshipit-source-id: 58ab7127f853549d29e7b25648dd7098219fe5c3
0 commit comments