trunk/393b6f9934ed865c41a8660069f03f1752948f23: [dynamo] support self-referentiable lists and dicts (#173672)
A subtle PyTorch fix that could massively speed up your compiled models...
A recent PyTorch commit (trunk/393b6f9) fixes a Dynamo compiler issue where self-referential lists and dictionaries were incorrectly stored as temporary variables, bloating compiled code. The fix ensures the compiler's second codegen pass prunes these unnecessary temps, leading to cleaner, more efficient bytecode. This resolves GitHub issue #173384 and is a follow-up to optimize memory usage by eliminating redundant storage operations in TorchDynamo's eager backend compilation.
Why It Matters
This optimization reduces memory overhead and can lead to faster execution for PyTorch models using complex, self-referential data structures.