Generated Dynamo graphs for torch.inference_mode() contain calls to
torch.autograd.grad_mode._enter_inference_mode and _exit_inference_mode.
Retracing those graphs used to treat _enter_inference_mode as an ordinary
in-graph torch function, then failed when handle_traced_output tried to wrap
its non-Tensor _InferenceMode return value.
Teach TorchInGraphFunctionVariable to map those generated helper calls back to
Dynamo's existing InferenceModeVariable. The enter handler now records the same
FX node and cleanup behavior used by the original context-manager path, and the
exit handler delegates to InferenceModeVariable.exit(). This keeps the fix scoped
to the generated helper pair instead of adding a broad non-Tensor escape hatch in
handle_traced_output, which would hide unrelated unsupported returns.
Fixes
Approved by: https://github.com/rtimpe
Community-Analysen & Experten-Meinungen 0
Verwandte Story-Cluster & Quellen (Vektor-KI)
Ähnliche Beiträge
Auch interessante Nachrichten trunk/4b169340ef40f11b42b52925f1329a18a152d9e1: [dynamo] Support retracing inference_mode helpers (#185066)
Thematisch verwandte Begriffe: trunk4b169340ef40f11b42b52925f1329a18a152d9e1, dynamo, Support, retracing · 6 Treffer
Apple accuses OpenAI of destroying evidence as trade-secrets fight intensifies
GPT-6 Astra Release Today? OpenAI’s Next Major AI Model Is Almost Here
Videos werden geladen ...
Beiträge werden geladen ...
Videos werden geladen ...
Beiträge werden geladen ...
Videos werden geladen ...
Beiträge werden geladen ...
Videos werden geladen ...
Beiträge werden geladen ...
Videos werden geladen ...
SOCIAL SHARE CARD GENERATOR