← Back to events
ActiveAIRelease3.14

trunk/07622962ce62fa3352b7e855186321a55bc1daa7: [dynamo] Fix callable attributes of polyfilled functions (#200361)

Photo: PyTorch Releases

What happened

Calling a polyfilled function's __torch_dynamo_polyfill__ or __wrapped__ attribute during tracing raises "Polyfill handler ... does not have a traceable function". PolyfilledFunctionVariable.call_method assumes the attribute is itself a registered polyfill, although it can be an ordinary Python function. Build callable attributes through the normal variable dispatcher, retaining their attribute source for guards. On…

Summary assembled by rule from the sources below

Why it's spreading

Sources