trunk/75f36ef10712171a710343afce232b14e0c776d5: Fix NumPy ndarray operators under default device contexts (#185462)
- PyTorch: 1733 events in the last 90 days
- PyTorch: 1712th Release in the last 90 days
- Previous: earlier the same day · trunk/77dccac963ddc0a5d245e703178e5ffd033d4dc5
What happened
Dynamo models NumPy arrays as NumpyNdarrayVariable, a TensorVariable subclass used for implementation sharing. Active TorchFunctionModes were checked before the NumPy operator path, so a default device context routed ndarray-only expressions through tensor methods and tried to call methods such as ndarray.mul(). Skipping that trace-time mode dispatch exposed two related edge cases. The generated numpy_operator_wrapp…
Summary assembled by rule from the sources below