[ExecuTorch][Weight Sharing] Track Named Data Store in EdgeProgramManager#9293
Merged
[ExecuTorch][Weight Sharing] Track Named Data Store in EdgeProgramManager#9293
Conversation
…ager Pull Request resolved: #9151 We enable Backends to return Named Data by adding NamedDataStoreOutput to the preprocess result. This is a completely BC change, as no backends with an implemented preprocess will see any change if nothing is explicitly implemented. For backend developers to leverage the new NamedDataStore, they can initialize a new NamedDataStore() within preprocess, add_named_data to the data store, and return the NamedDataStore.get_named_data_store_output() in the preprocess result like such: ``` def preprocess(ExportedProgram, List[CompileSpecs]) -> PreprocessResult: named_data_store = NamedDataStore() for node in exported_program.graph.nodes: named_data_store.add_named_data("name", bytes) return PreprocessResult( processed_bytes=bytes, debug_handle_map={}, data_store_output= named_data_store.get_named_data_store_output() ) ``` Under the hood, the data store output is embedded in the loweredbackendmodule, (serializing loweredbackendmodule by itself with the a named_data_store_output is still a todo). But via the EdgeProgramManager path, we add the named_data_store_outputs to the edge_program_manger's named data store to keep track of all the named data returned by backends. ghstack-source-id: 271732049 @exported-using-ghexport Differential Revision: [D70451660](https://our.internmc.facebook.com/intern/diff/D70451660/)
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/9293
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New FailuresAs of commit aef99e3 with merge base 630d0cc ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
SS-JIA
approved these changes
Mar 14, 2025
DannyYuyang-quic
pushed a commit
to CodeLinaro/executorch
that referenced
this pull request
Apr 2, 2025
…ager (pytorch#9293) This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: pytorch#9151 by @mcr229 ^ Please use this as the source of truth for the PR details, comments, and reviews ghstack PR base: https://github.com/pytorch/executorch/tree/gh/mcr229/7/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/mcr229/7/head Merge bot PR base: https://github.com/pytorch/executorch/tree/main Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/mcr229/7/orig @diff-train-skip-merge Co-authored-by: Max Ren <maxren@meta.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #9151 by @mcr229
^ Please use this as the source of truth for the PR details, comments, and reviews
ghstack PR base: https://github.com/pytorch/executorch/tree/gh/mcr229/7/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/mcr229/7/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/main
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/mcr229/7/orig
@diff-train-skip-merge