-
Notifications
You must be signed in to change notification settings - Fork 22.6k
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
Automatic pulling ExtraFileMaps without explicit mapping. #99747
Automatic pulling ExtraFileMaps without explicit mapping. #99747
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/99747
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 60b16dc: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D45170126 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D45170126 |
059fbea
to
4aa7c62
Compare
This pull request was exported from Phabricator. Differential Revision: D45170126 |
4aa7c62
to
06356ff
Compare
This pull request was exported from Phabricator. Differential Revision: D45170126 |
06356ff
to
82ea0b0
Compare
This pull request was exported from Phabricator. Differential Revision: D45170126 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D45170126 |
82ea0b0
to
7f0892f
Compare
7f0892f
to
e6f9ccd
Compare
This pull request was exported from Phabricator. Differential Revision: D45170126 |
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 - address linter issues
otherwise LGTM!
This pull request was exported from Phabricator. Differential Revision: D45170126 |
e6f9ccd
to
eca8b2c
Compare
eca8b2c
to
d46b18d
Compare
This pull request was exported from Phabricator. Differential Revision: D45170126 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D45170126 |
d46b18d
to
cde036b
Compare
cde036b
to
7d6030e
Compare
This pull request was exported from Phabricator. Differential Revision: D45170126 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D45170126 |
7d6030e
to
1cac0f5
Compare
) Summary: Pull Request resolved: pytorch#99747 It comes handy when we are trying to load a module with ExtraFileMaps after JITing since [*BytecodeDeserializer*](https://www.internalfb.com/code/aros/[144773a900f80d6bdb2cbc35f817532200b545be]/xros/third-party/caffe2/caffe2/torch/csrc/jit/mobile/import.cpp?lines=196%2C389%2C408%2C569%2C611) loops over extra maps entries that is given from end-user APIs. We can simply uses [getAllRecord](https://www.internalfb.com/code/fbsource/[c8b0b670f4782345c954a292dc20f562dd95e263]/xplat/caffe2/caffe2/serialize/inline_container.cc?lines=31%2C67%2C72%2C79%2C86%2C92%2C174%2C178%2C222%2C243%2C275%2C283%2C304%2C322) so that we can easily pull all extra files embedded without explicitly mapping with high level [API ](https://www.internalfb.com/code/fbsource/fbcode/caffe2/torch/csrc/jit/mobile/import.cpp?lines=548-563) Note : - Flatbuffer by nature already extracts all embedded files without explicit mapping. I'm simply adding extra unit test for future refence if someone also interested in knowing later on - only lite interpreter needs a change as diff does Test Plan: buck2 run //caffe2/test/cpp/jit:jit -- --gtest_filter=LiteInterpreterTest.ExtraFiles buck2 run //caffe2/test/cpp/jit:jit -- --gtest_filter=FlatbufferTest.ExtraFiles Reviewed By: davidberard98 Differential Revision: D45170126 fbshipit-source-id: 57c8a43cd64931f5dcca4b36d306b23769d4ce5b
1cac0f5
to
60b16dc
Compare
This pull request was exported from Phabricator. Differential Revision: D45170126 |
Differential Revision: D45170126nnPull Request resolved: pytorch#99747
Summary:
It comes handy when we are trying to load a module with ExtraFileMaps after JITing since BytecodeDeserializer loops over extra maps entries that is given from end-user APIs.
We can simply uses getAllRecord so that we can easily pull all extra files embedded without explicitly mapping with high level API
Note :
Flatbuffer by nature already extracts all embedded files without explicit mapping. I'm simply adding extra unit test for future refence if someone also interested in knowing later on
only lite interpreter needs a change as diff does
Test Plan:
buck2 run //caffe2/test/cpp/jit:jit -- --gtest_filter=LiteInterpreterTest.ExtraFiles
buck2 run //caffe2/test/cpp/jit:jit -- --gtest_filter=FlatbufferTest.ExtraFiles
Differential Revision: D45170126