-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
[xnnpack][lite-int][on-device] rebuild serialized modules at runtime #88780
Conversation
This is the on-device runtime work. We modify the compile and execute from our hacky solution from before to what will actually be running at runtime. First we rebuild our graph from the serialized flatbuffer string. We also introduce a runtime wrapper that inherits CustomClassHolder that allows us to forward along the built xnngraph runtime to our execute function Once the subgraph object has been rebuilt by our we pass it along to the runtime wrapper for us to forward along to execute At execute we prep the input/outputs and invoke the runtime using our runtime wrapper. Finally we forward those results to our execution Differential Revision: [D39413031](https://our.internmc.facebook.com/intern/diff/D39413031/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D39413031/)! [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/88780
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 367ac85: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This is the on-device runtime work. We modify the compile and execute from our hacky solution from before to what will actually be running at runtime. First we rebuild our graph from the serialized flatbuffer string. We also introduce a runtime wrapper that inherits CustomClassHolder that allows us to forward along the built xnngraph runtime to our execute function Once the subgraph object has been rebuilt by our we pass it along to the runtime wrapper for us to forward along to execute At execute we prep the input/outputs and invoke the runtime using our runtime wrapper. Finally we forward those results to our execution Differential Revision: [D39413031](https://our.internmc.facebook.com/intern/diff/D39413031/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D39413031/)! ghstack-source-id: 173215762 Pull Request resolved: #88780
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
…ytorch#88780) This is the on-device runtime work. We modify the compile and execute from our hacky solution from before to what will actually be running at runtime. First we rebuild our graph from the serialized flatbuffer string. We also introduce a runtime wrapper that inherits CustomClassHolder that allows us to forward along the built xnngraph runtime to our execute function Once the subgraph object has been rebuilt by our we pass it along to the runtime wrapper for us to forward along to execute At execute we prep the input/outputs and invoke the runtime using our runtime wrapper. Finally we forward those results to our execution Differential Revision: [D39413031](https://our.internmc.facebook.com/intern/diff/D39413031/) **NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D39413031/)! Pull Request resolved: pytorch#88780 Approved by: https://github.com/digantdesai
Stack from ghstack (oldest at bottom):
This is the on-device runtime work. We modify the compile and execute from our hacky solution from before to what will actually be running at runtime.
First we rebuild our graph from the serialized flatbuffer string. We also introduce a runtime wrapper that inherits CustomClassHolder that allows us to forward along the built xnngraph runtime to our execute function
Once the subgraph object has been rebuilt by our we pass it along to the runtime wrapper for us to forward along to execute
At execute we prep the input/outputs and invoke the runtime using our runtime wrapper. Finally we forward those results to our execution
Differential Revision: D39413031
NOTE FOR REVIEWERS: This PR has internal Meta-specific changes or comments, please review them on Phabricator!