trunk/6df74531a6e7226f48394c5cb7af2953f2841a2a: Fix Dynamo wrapper method sources for nested compile (#184977)
- PyTorch: 699 events in the last 90 days
- PyTorch: 690th Release in the last 90 days
- Previous: earlier the same day · trunk/6d3bfe19bc19e7937c95c25f42d966806fae90a3
What happened
Methods decorated with torch.compile remain wrapper functions in their class dictionary, while the function Dynamo should inline lives at _torchdynamo_inline. Method lookup eagerly unwrapped that attribute into a UserMethodVariable. Its unbound-function source could still point at the outer wrapper, so closure guards for the inner function were evaluated against the wrong closure and eventually reached Dynamo's Catc…
Summary assembled by rule from the sources below