-
Notifications
You must be signed in to change notification settings - Fork 607
DynamicShim for dlsym user #3136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/3136
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 7c269e9 with merge base de0c233 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D55025594 |
6367852
to
20bd0e0
Compare
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. Differential Revision: D55025594
This pull request was exported from Phabricator. Differential Revision: D55025594 |
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. Differential Revision: D55025594
20bd0e0
to
fbe0132
Compare
This pull request was exported from Phabricator. Differential Revision: D55025594 |
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. Differential Revision: D55025594
fbe0132
to
c3d1296
Compare
This pull request was exported from Phabricator. Differential Revision: D55025594 |
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. Differential Revision: D55025594
c3d1296
to
1834541
Compare
This pull request was exported from Phabricator. Differential Revision: D55025594 |
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. Differential Revision: D55025594
1834541
to
3b805fa
Compare
This pull request was exported from Phabricator. Differential Revision: D55025594 |
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. Differential Revision: D55025594
3b805fa
to
e9d81d4
Compare
This pull request was exported from Phabricator. Differential Revision: D55025594 |
@kirklandsign has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
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. Reviewed By: kimishpatel Differential Revision: D55025594 Pulled By: kirklandsign
67a59d9
to
7c269e9
Compare
This pull request was exported from Phabricator. Differential Revision: D55025594 |
@kirklandsign merged this pull request in b5bb921. |
Summary:
Add a shim layer so that users just need the header and load the symbol with dlsym.
we will have two libraries:
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
andfree_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.Differential Revision: D55025594