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
[export][retry] Move lifted tensors out of state_dict #113689
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/113689
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit e61b61e with merge base 77f66ad (): This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This pull request was exported from Phabricator. Differential Revision: D51321532 |
assert hasattr(graph_signature, "lifted_tensor_constants") | ||
for name, value in tensor_constants.items(): | ||
if name in graph_signature.lifted_tensor_constants: | ||
new_gm.register_buffer(name, value) |
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.
Where do we delete the buffers from state_dict?
Summary: X-link: pytorch/executorch#1210 Test Plan: CI Reviewed By: ydwu4 Differential Revision: D51321532
Summary: X-link: pytorch/pytorch#113689 Reviewed By: ydwu4 Differential Revision: D51321532
0ebc7e9
to
0ead0e1
Compare
Summary: X-link: pytorch/executorch#1210 Test Plan: CI Reviewed By: ydwu4 Differential Revision: D51321532
This pull request was exported from Phabricator. Differential Revision: D51321532 |
Summary: X-link: pytorch/pytorch#113689 Reviewed By: ydwu4 Differential Revision: D51321532
0ead0e1
to
e61b61e
Compare
This pull request was exported from Phabricator. Differential Revision: D51321532 |
Summary: X-link: pytorch/pytorch#113689 Pull Request resolved: #1210 Reviewed By: ydwu4 Differential Revision: D51321532 fbshipit-source-id: 10461f6f1e4d359d34dc52c3aa442b2c3cbe7057
@pytorchbot merge (Initiating merge automatically since Phabricator Diff has merged) |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Since pytorch 2.1 release we've made some BC breaking changes to the serialized schema. We should update it in time for the 2.2 release. Some of the changes include: * #114371 - custom class objects / pybinded objects are no longer saved directly to the `ExportedProgram` structure. Instead, the name is serialized inside of the program, and the actual bytes are stored. in a separate location from the exported program, allowing it to be saved to a different location. * #111204 - `GraphSignature` structure changed and `call_spec` is removed from the `GraphModule` schema * #111407 - `loss_outout` -> `loss_output` * #113075 - `example_inputs` removed from the `ExportedProgram` structure (this originally did not store anything), `dialect` added to the `ExportedProgram` structure. * #113689 - tensor constants are now lifted as inputs to the graph, and their locations are stored in the `GraphSignature` * #114172 - removed `equality_constraints` and added a `SymExprHint` for all symbolic expressions. Pull Request resolved: #115712 Approved by: https://github.com/gmagogsfm
Since pytorch 2.1 release we've made some BC breaking changes to the serialized schema. We should update it in time for the 2.2 release. Some of the changes include: * #114371 - custom class objects / pybinded objects are no longer saved directly to the `ExportedProgram` structure. Instead, the name is serialized inside of the program, and the actual bytes are stored. in a separate location from the exported program, allowing it to be saved to a different location. * #111204 - `GraphSignature` structure changed and `call_spec` is removed from the `GraphModule` schema * #111407 - `loss_outout` -> `loss_output` * #113075 - `example_inputs` removed from the `ExportedProgram` structure (this originally did not store anything), `dialect` added to the `ExportedProgram` structure. * #113689 - tensor constants are now lifted as inputs to the graph, and their locations are stored in the `GraphSignature` * #114172 - removed `equality_constraints` and added a `SymExprHint` for all symbolic expressions. Pull Request resolved: #115712 Approved by: https://github.com/gmagogsfm
Since pytorch 2.1 release we've made some BC breaking changes to the serialized schema. We should update it in time for the 2.2 release. Some of the changes include: * pytorch#114371 - custom class objects / pybinded objects are no longer saved directly to the `ExportedProgram` structure. Instead, the name is serialized inside of the program, and the actual bytes are stored. in a separate location from the exported program, allowing it to be saved to a different location. * pytorch#111204 - `GraphSignature` structure changed and `call_spec` is removed from the `GraphModule` schema * pytorch#111407 - `loss_outout` -> `loss_output` * pytorch#113075 - `example_inputs` removed from the `ExportedProgram` structure (this originally did not store anything), `dialect` added to the `ExportedProgram` structure. * pytorch#113689 - tensor constants are now lifted as inputs to the graph, and their locations are stored in the `GraphSignature` * pytorch#114172 - removed `equality_constraints` and added a `SymExprHint` for all symbolic expressions. Pull Request resolved: pytorch#115712 Approved by: https://github.com/gmagogsfm
Since pytorch 2.1 release we've made some BC breaking changes to the serialized schema. We should update it in time for the 2.2 release. Some of the changes include: * #114371 - custom class objects / pybinded objects are no longer saved directly to the `ExportedProgram` structure. Instead, the name is serialized inside of the program, and the actual bytes are stored. in a separate location from the exported program, allowing it to be saved to a different location. * #111204 - `GraphSignature` structure changed and `call_spec` is removed from the `GraphModule` schema * #111407 - `loss_outout` -> `loss_output` * #113075 - `example_inputs` removed from the `ExportedProgram` structure (this originally did not store anything), `dialect` added to the `ExportedProgram` structure. * #113689 - tensor constants are now lifted as inputs to the graph, and their locations are stored in the `GraphSignature` * #114172 - removed `equality_constraints` and added a `SymExprHint` for all symbolic expressions. Pull Request resolved: #115712 Approved by: https://github.com/gmagogsfm
Since pytorch 2.1 release we've made some BC breaking changes to the serialized schema. We should update it in time for the 2.2 release. Some of the changes include: * pytorch#114371 - custom class objects / pybinded objects are no longer saved directly to the `ExportedProgram` structure. Instead, the name is serialized inside of the program, and the actual bytes are stored. in a separate location from the exported program, allowing it to be saved to a different location. * pytorch#111204 - `GraphSignature` structure changed and `call_spec` is removed from the `GraphModule` schema * pytorch#111407 - `loss_outout` -> `loss_output` * pytorch#113075 - `example_inputs` removed from the `ExportedProgram` structure (this originally did not store anything), `dialect` added to the `ExportedProgram` structure. * pytorch#113689 - tensor constants are now lifted as inputs to the graph, and their locations are stored in the `GraphSignature` * pytorch#114172 - removed `equality_constraints` and added a `SymExprHint` for all symbolic expressions. Pull Request resolved: pytorch#115712 Approved by: https://github.com/gmagogsfm
Since pytorch 2.1 release we've made some BC breaking changes to the serialized schema. We should update it in time for the 2.2 release. Some of the changes include: * pytorch#114371 - custom class objects / pybinded objects are no longer saved directly to the `ExportedProgram` structure. Instead, the name is serialized inside of the program, and the actual bytes are stored. in a separate location from the exported program, allowing it to be saved to a different location. * pytorch#111204 - `GraphSignature` structure changed and `call_spec` is removed from the `GraphModule` schema * pytorch#111407 - `loss_outout` -> `loss_output` * pytorch#113075 - `example_inputs` removed from the `ExportedProgram` structure (this originally did not store anything), `dialect` added to the `ExportedProgram` structure. * pytorch#113689 - tensor constants are now lifted as inputs to the graph, and their locations are stored in the `GraphSignature` * pytorch#114172 - removed `equality_constraints` and added a `SymExprHint` for all symbolic expressions. Pull Request resolved: pytorch#115712 Approved by: https://github.com/gmagogsfm
Since pytorch 2.1 release we've made some BC breaking changes to the serialized schema. We should update it in time for the 2.2 release. Some of the changes include: * pytorch#114371 - custom class objects / pybinded objects are no longer saved directly to the `ExportedProgram` structure. Instead, the name is serialized inside of the program, and the actual bytes are stored. in a separate location from the exported program, allowing it to be saved to a different location. * pytorch#111204 - `GraphSignature` structure changed and `call_spec` is removed from the `GraphModule` schema * pytorch#111407 - `loss_outout` -> `loss_output` * pytorch#113075 - `example_inputs` removed from the `ExportedProgram` structure (this originally did not store anything), `dialect` added to the `ExportedProgram` structure. * pytorch#113689 - tensor constants are now lifted as inputs to the graph, and their locations are stored in the `GraphSignature` * pytorch#114172 - removed `equality_constraints` and added a `SymExprHint` for all symbolic expressions. Pull Request resolved: pytorch#115712 Approved by: https://github.com/gmagogsfm
Fixes #110484
Test Plan: CI
Differential Revision: D51321532
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @suo @ydwu4