PyTorch: [dynamo] Fix silently omitted `maxlen` for `deque` inputs (#200528)
Replay input deque mutations through deque.__init__ with the final contents and maxlen , preserving the original object’s identity.
Executive Summary
Replay input deque mutations through deque.__init__ with the final contents and maxlen , preserving the original object’s identity. This supports bounded mutations and explicit reinitialization with a different limit; clear() followed by extend() would retain the old limit and could truncate the contents. Regression tests compare eager and fullgraph=True execution for append , appendleft , repeated calls, zero-capacity deque s, object identity, and changes to maxlen .
Hyperscale Open Source & Cloud Infrastructure Review
From an infrastructure engineering, cloud-native scale, and hyperscale governance standpoint: - **Hyperscale Provenance:** Open-sourcing internal frameworks subjects proprietary systems to rigorous public analysis. - **De-facto Standard Cohesion:** Publishing enterprise tooling establishes interoperable specifications across distributed execution. - **Vendor Decoupling:** Platform engineers can inspect underlying telemetry and memory layouts without black-box vendor lock-in.
Impact on the Open Ecosystem
Bridges enterprise engineering scale with independent, reproducible open-source software stacks.