-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Split module.cpp and export.cpp to support saving on mobile #29881
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
This pull request was exported from Phabricator. Differential Revision: D18509296 |
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.
Curious are the std::to_string
changes meant to be part of another PR #29839 ?
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.
Yeah, I think that happened because it's a stacked diff in fbsource.
Are there any changes that don't just move code to a different file? |
7d955a8
to
75acb60
Compare
This pull request was exported from Phabricator. Differential Revision: D18509296 |
…29881) Summary: Pull Request resolved: pytorch#29881 Breaking these into separate files allows us to have three different builds: - Mobile inference-only. - Mobile with module saving. - Server with module saving and other export functions like ONNX. And this can be accomplished just by selecting which cpp files to compile, without setting any preprocessor flags. Test Plan: CI. Local mobile+saving build. Reviewed By: smessmer Differential Revision: D18509296 fbshipit-source-id: 151a8cca9a01ec9ccc42df060ff03885a4bcf515
75acb60
to
a3984ab
Compare
This pull request was exported from Phabricator. Differential Revision: D18509296 |
This pull request has been merged in fbcb88e. |
Summary: PR #29881 moved Module::save() methods to a separate source file and removed C10_MOBILE gating logic. Seems it should stay with export_module.cpp (which is in "NOT INTERN_BUILD_MOBILE" section). Otherwise it causes link error with build_mobile.sh. Test: - build locally - check CI [ghstack-poisoned]
Summary: PR #29881 moved Module::save() methods to a separate source file and removed C10_MOBILE gating logic. Seems it should stay with export_module.cpp (which is in "NOT INTERN_BUILD_MOBILE" section). Otherwise it causes link error with build_mobile.sh. Test: - build locally - check CI ghstack-source-id: 0485324 Pull Request resolved: #30221
… in cmake" Summary: PR #29881 moved Module::save() methods to a separate source file and removed C10_MOBILE gating logic. Seems it should stay with export_module.cpp (which is in "NOT INTERN_BUILD_MOBILE" section). Otherwise it causes link error with build_mobile.sh. Test: - build locally - check CI Differential Revision: [D18649234](https://our.internmc.facebook.com/intern/diff/D18649234) [ghstack-poisoned]
Summary: Pull Request resolved: #30221 PR #29881 moved Module::save() methods to a separate source file and removed C10_MOBILE gating logic. Seems it should stay with export_module.cpp (which is in "NOT INTERN_BUILD_MOBILE" section). Otherwise it causes link error with build_mobile.sh. Test: - build locally - check CI Test Plan: Imported from OSS Differential Revision: D18649234 Pulled By: ljk53 fbshipit-source-id: b6c90a532d191c41ce10c1047a869d8f73854c4d
Summary:
Breaking these into separate files allows us to have three different builds:
And this can be accomplished just by selecting which cpp files to compile,
without setting any preprocessor flags.
Test Plan: CI. Local mobile+saving build.
Differential Revision: D18509296