-
Notifications
You must be signed in to change notification settings - Fork 716
[Executorch] Make module constructors uniform across #15709
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
base: gh/kimishpatel/209/base
Are you sure you want to change the base?
Conversation
Existing constructors dont compose well such that if you want data loader or data files constructor then you cannot get to override memory allocator. Fix that. Differential Revision: [D86120037](https://our.internmc.facebook.com/intern/diff/D86120037/) [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15709
Note: Links to docs will display an error until the docs builds have been completed. ❌ 14 New FailuresAs of commit 799c34b with merge base aba44fd ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
| explicit Module( | ||
| const std::string& file_path, | ||
| const LoadMode load_mode = LoadMode::File, | ||
| std::unique_ptr<runtime::MemoryAllocator> memory_allocator = nullptr, |
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.
nit: method_allocator
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.
oh I see. This is supposed to be called method_allocator?
| const LoadMode load_mode = LoadMode::File, | ||
| std::unique_ptr<runtime::MemoryAllocator> memory_allocator = nullptr, | ||
| std::unique_ptr<runtime::MemoryAllocator> temp_allocator = nullptr, | ||
| std::unique_ptr<runtime::EventTracer> event_tracer = nullptr); |
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.
This is technically a bc breaking change
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.
That is true. Is this part of core API btw given that it is in extension?
I do think we should unify the interface though.
Stack from ghstack (oldest at bottom):
Existing constructors dont compose well such that if you want data loader or data files constructor then you cannot get to override memory allocator.
Fix that.
Differential Revision: D86120037