pytorch/test/export
Avik Chaudhuri 42b8e233d9 serde unbacked bindings (#144894)
Adds unbacked bindings during deserialization. These are carried by a node's metadata, and map pending fresh unbacked symbols to paths to such symbols inside the corresponding example value carried by the node's metadata.

Since it is awkward to serialize paths, we only serialize the names of these symbols and reconstruct the paths on deserialization, using a shape env util. We also need to bump counters for unbacked symbols here, because the shape env util we use to create these symbols (when deserializing example values) don't do so, and not doing so makes later passes (like `run_decompositions`) crash because new unbacked symbols don't get new names.

This is enough for non-strict. For strict, the unbacked bindings and example values in node metadata can get out of sync, because of running AOTAutograd as an additional step after Dynamo. So we have to sync those back.

Differential Revision: [D68232274](https://our.internmc.facebook.com/intern/diff/D68232274/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/144894
Approved by: https://github.com/pianpwk
2025-01-25 02:34:27 +00:00
..
__init__.py
opinfo_schema.py
random_dag.py
test_converter.py PEP585 update - test (#145176) 2025-01-22 04:48:28 +00:00
test_cpp_serdes.py
test_db.py
test_draft_export.py PEP585 update - test (#145176) 2025-01-22 04:48:28 +00:00
test_experimental.py [export] handle buffer/input mutations for joint-graph (#144806) 2025-01-16 00:22:16 +00:00
test_export.py serde unbacked bindings (#144894) 2025-01-25 02:34:27 +00:00
test_export_legacy.py EZ fix to make sure local pytest run succeeds in export (#144764) 2025-01-15 00:43:40 +00:00
test_export_nonstrict.py
test_export_training_ir_to_run_decomp.py
test_functionalized_assertions.py
test_hop.py [BE][export] Fix hop tests with flaky memory leak (#145391) 2025-01-24 09:53:21 +00:00
test_lift_unlift.py PEP585 update - test (#145176) 2025-01-22 04:48:28 +00:00
test_pass_infra.py
test_passes.py PEP585 update - test (#145176) 2025-01-22 04:48:28 +00:00
test_retraceability.py
test_schema.py Tweak schema_check to handle annotated builtin types (#145154) 2025-01-19 18:48:35 +00:00
test_serdes.py
test_serialize.py [export] Load side info about pos/kw argument kind for serialization. (#144686) 2025-01-15 19:08:38 +00:00
test_sparse.py
test_swap.py
test_tools.py
test_torchbind.py
test_tree_utils.py
test_unflatten.py
test_unflatten_training_ir.py
test_verifier.py
testing.py