trunk/77e2446a88a185f32ef15b71db95fd055e25ffda: [dynamo] Trace torch.overrides.handle_torch_function (#196055)
- PyTorch: 1956 events in the last 90 days
- PyTorch: 1930th Release in the last 90 days
- Previous: earlier the same day · trunk/6a3a43fbf2d65204345bdb1789a02a4c0142d821: [Inductor] Match eager float-to-int narrowing in strict modes (#199788)
What happened
torch.overrides.handle_torch_function is how Python-level functions participate in __torch_function__ dispatch. Dynamo tried to inline its body, which touches the C mode stack directly and fails. It is now a TorchInGraphFunctionVariable whose handler forwards to dispatch_torch_function , which gained a relevant_args parameter so that overload resolution only considers the objects the caller passed, as the eager impl…
Summary assembled by rule from the sources below