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:
Add a shim layer so that users just need the header and load the symbol with dlsym.
we will have two libraries:
- header, where declarations and class (shim) are to be compiled with their codebase statically. Want to keep this minimal.
- implementation, which pulls in the ET libraries and shim implementation. It’s compiled separately as a .so file and they can load and find symbols with dlopen and dlsym.
Note that users only need to compile the header dynamic_shim.h into their code in compile time. dynamic_shim.h contains minimal dependency from ExecuTorch, so it won't impact static time binary size or startup time. The actual implementation dynamic_shim_impl is compiled into a separate shared library, which has all the ExecuTorch libraries. The shared library can be loaded later with dlopen.
For users, they can now only load the so library, and just use dysym to look for exposed API `create_executorch_dynamic_shim` and `free_executorch_dynamic_shim`, and use API code in DynamicShim (as a pointer to an interface), and the DynamicShimImpl will invoke the actual ET Module code in its implementation details.
Pull Request resolved: #3136
Reviewed By: kimishpatel
Differential Revision: D55025594
Pulled By: kirklandsign
fbshipit-source-id: a0b1fa90997dee920920e6f582dd51719c2958eb
0 commit comments