trunk/33797020d6c2787535ebd2f0785b1f4ffbff37c7: Fix Dynamo tracing of torch.random.fork_rng (#186168)
- PyTorch: 1376 events in the last 90 days
- PyTorch: 1359th Release in the last 90 days
- Previous: earlier the same day · trunk/410f3ce631a997f3ad16d86ae376ec597ea3988f: [Dynamo] Extend lazy constant ops to bitwise and comparisons (#191143)
What happened
Dynamo was classifying torch.random.fork_rng as an in-graph torch function. That is not a valid lowering target: fork_rng is a Python context manager, and proxying the call made FX try to convert its Python arguments into graph arguments. When the devices argument was a set, FX failed with NotImplementedError before Dynamo could trace the context manager body. Remove fork_rng from the non-C binding in-graph function…
Summary assembled by rule from the sources below