trunk/058ee834dbcb06c54b83bbf3ca23f0e41d6c1285: [PyTorch] Handle reserved keyword arguments in FX codegen (#199930)
- PyTorch: 1992 events in the last 90 days
- PyTorch: 1965th Release in the last 90 days
- Previous: earlier the same day · trunk/dbb3587d86946784cc4652cc236f44151dc63fef: Mark unused parameters in lazy (#199465)
What happened
Summary: FX Node.kwargs keys are arbitrary strings, but Python call syntax only permits identifiers that are not reserved keywords in the form name=value. FX code generation currently renders every entry that way. A graph containing a key such as "from" therefore generates invalid Python (from = value) and GraphModule recompilation fails with SyntaxError. Non-identifiers such as "not-an-identifier" have the same pro…
Summary assembled by rule from the sources below