-
Notifications
You must be signed in to change notification settings - Fork 604
[ExecuTorch][#10364] Add Protected Method Getter in extension.Module
#10374
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
[ExecuTorch][#10364] Add Protected Method Getter in extension.Module
#10374
Conversation
…dule # Context This issue is a step of #9638. In the discussion, we want to unblock having `extension/Module` as the single source of implementation, which means that `pybindings/PyModule` should use `extension/Module` rather than its own. Although we are decouping method getter from `pybindings` implementation, method getter itself is still needed. To keep having the method getter while not exposing it, we can create a protected method getter and confine it's usage inside child classes that we are about to create. # Proposal Add a protected `get_method` to `extension.Module`, taking method name string as an input. Differential Revision: [D73473766](https://our.internmc.facebook.com/intern/diff/D73473766/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/10374
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit daf2a80 with merge base 95c663e ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
…dule # Context This issue is a step of #9638. In the discussion, we want to unblock having `extension/Module` as the single source of implementation, which means that `pybindings/PyModule` should use `extension/Module` rather than its own. Although we are decouping method getter from `pybindings` implementation, method getter itself is still needed. To keep having the method getter while not exposing it, we can create a protected method getter and confine it's usage inside child classes that we are about to create. # Proposal Add a protected `get_method` to `extension.Module`, taking method name string as an input. Differential Revision: [D73473766](https://our.internmc.facebook.com/intern/diff/D73473766/) ghstack-source-id: 279669340 Pull Request resolved: #10374
This pull request was exported from Phabricator. Differential Revision: D73473766 |
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!
d7dd048
into
gh/zhenyan-zhang-meta/4/base
extension.Module
extension.Module
extension.Module
…dule (#10384) This PR was created by the merge bot to help merge the original PR into the main branch. ghstack PR number: #10374 by @zhenyan-zhang-meta ^ 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/zhenyan-zhang-meta/4/base ghstack PR head: https://github.com/pytorch/executorch/tree/gh/zhenyan-zhang-meta/4/head Merge bot PR base: https://github.com/pytorch/executorch/tree/main Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/zhenyan-zhang-meta/4/orig @diff-train-skip-merge Co-authored-by: zhenyanzhang <[email protected]>
Stack from ghstack (oldest at bottom):
extension.Module
#10374Context
This issue is a step of #9638. In the discussion, we want to unblock having
extension/Module
as the single source of implementation, which means thatpybindings/PyModule
should useextension/Module
rather than its own.Although we are decouping method getter from
pybindings
implementation, method getter itself is still needed. To keep having the method getter while not exposing it, we can create a protected method getter and confine it's usage inside child classes that we are about to create.Proposal
Add a protected
get_method
toextension.Module
, taking method name string as an input.Differential Revision: D73473766