pytorch/torch/_export/serde
Avik Chaudhuri 1a613c3342 bump counters for unbacked binding names (#145882)
Instead of bumping symint counters when we process unbacked bindings during deserialization, it's better to bump them at the beginning based on what the symbols in the original shape env before serialization were. This allows symbols in unbacked bindings to have "gaps" that bumping alone would not be able to match.

Why is bumping counters important at all? It is because when the shape env coming out of deserialization is used later for propagating symints, say in run_decompositions, we don't want new names to clash with existing names (bad things happen).

Differential Revision: [D68798191](https://our.internmc.facebook.com/intern/diff/D68798191/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/145882
Approved by: https://github.com/pianpwk
2025-01-29 17:46:21 +00:00
..
gen-cpp2 [export][ez] Fix forward D67044185 (#143193) 2024-12-13 16:06:42 +00:00
__init__.py
aoti_schema.py PEP585 update - torch/_export (#145138) 2025-01-19 18:48:35 +00:00
dynamic_shapes.py PEP585 update - torch/_export (#145138) 2025-01-19 18:48:35 +00:00
export_schema.thrift [export] Load side info about pos/kw argument kind for serialization. (#144686) 2025-01-15 19:08:38 +00:00
schema.py PEP585 update - torch/_export (#145138) 2025-01-19 18:48:35 +00:00
schema.yaml [export] Load side info about pos/kw argument kind for serialization. (#144686) 2025-01-15 19:08:38 +00:00
schema_check.py PEP585 update - torch/_export (#145138) 2025-01-19 18:48:35 +00:00
serialize.py bump counters for unbacked binding names (#145882) 2025-01-29 17:46:21 +00:00
union.py PEP585 update - torch/_export (#145138) 2025-01-19 18:48:35 +00:00