-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Update generated headers and clang format. #73810
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
CI Flow Status⚛️ CI FlowRuleset - Version:
|
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit ac790b2 (more details on the Dr. CI page):
1 failure not recognized by patterns:
This comment was automatically generated by Dr. CI (expand for details).Please report bugs/suggestions to the (internal) Dr. CI Users group. |
|
@qihqi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
This pull request was exported from Phabricator. Differential Revision: D34652217 |
|
This pull request was exported from Phabricator. Differential Revision: D34652217 |
|
This pull request was exported from Phabricator. Differential Revision: D34652217 |
1 similar comment
|
This pull request was exported from Phabricator. Differential Revision: D34652217 |
|
This pull request was exported from Phabricator. Differential Revision: D34652217 |
|
This pull request was exported from Phabricator. Differential Revision: D34652217 |
test/cpp/jit/test_flatbuffer.cpp
Outdated
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.
Does the constant Tensors share the same data in the mobile module?
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.
yes.
test/cpp/jit/test_save_load.cpp
Outdated
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.
| static Module roundtrip(const Module& m) { | |
| static Module roundtripThroughMobile(const Module& m) { |
test/cpp/jit/test_save_load.cpp
Outdated
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.
Could we also save the extra files to mobile module to have a more complete roundtrip?
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.
extra files is orthogonal.
The full roundtrip is
jit::Module -> (ivalue, source, constant) -> flatbuffer -> (ivalue, source, constant) -> jit::Module.
This test only tests first first and last step:
jit::Module -> (ivalue, source, constant)->jit::Module.
A test with extrafiles would be better aimed at testing torch::jit::load when it handles flatbuffer.
gmagogsfm
left a comment
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.
Awesome, thanks for working out a solution so quickly.
test/jit/test_save_load.py
Outdated
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.
Typo?
tools/linter/clang_format_all.py
Outdated
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 sounds like a more independent change that can be spun off into its own PR?
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.
And maybe we can introduce an exclude_list instead of hard-coding it as a special case here.
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.
done.
test/jit/test_save_load.py
Outdated
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.
Do we want to eventually allow torch.jit.load to load a FlatBuffer module with JIT source code?
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:
Header that corresponds to current cpp file should be first #include, not others.
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.
Should we consider add these additional arguments to end of argument list so that we don't accidentaly break anyone that's passing extra_files as the third positional argument?
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.
What's the difference between version and operator_version? The first one refers to ByteCodeVersion today?
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.
Are a lot of changes in this file the result of upgrading flatbuffer version?
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.
Why do we need to emphasize it is JIT module when this is in torch::jit?
torch/jit/_serialization.py
Outdated
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.
Is it possible for FlatBuffer dependency to be missing in OSS? If so, then we could probably have a dedicated error message for OSS
|
This pull request was exported from Phabricator. Differential Revision: D34652217 |
1 similar comment
|
This pull request was exported from Phabricator. Differential Revision: D34652217 |
|
This pull request was exported from Phabricator. Differential Revision: D34652217 |
|
This pull request was exported from Phabricator. Differential Revision: D34652217 |
|
@gmagogsfm @iseeyuan as suggested I split the diff to make the generated header / clangformat change first. I'll publish another PR with the JIT source stuff. |
iseeyuan
left a comment
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. Please make sure the size with JIT module would be on par with the pickle format, where constants are shared and the overhead of saving JIT module is small.
Summary: Update flatbuffer generated header and add it to ignore for clang format Pull Request resolved: pytorch#73810 Test Plan: CI Reviewed By: iseeyuan Differential Revision: D34652217 Pulled By: qihqi fbshipit-source-id: 9a7daac921da7bae1bdd761942c2489c6902453a
|
This pull request was exported from Phabricator. Differential Revision: D34652217 |
Summary: Update flatbuffer generated header and add it to ignore for clang format Pull Request resolved: #73810 Test Plan: CI Reviewed By: iseeyuan Differential Revision: D34652217 Pulled By: qihqi fbshipit-source-id: fe281afd25d618d2e4852d6b76b813e2fbee0ddc
|
Hey @qihqi. |
title:
Test plan: CI