viable/strict/1789161800: [BE][MPS] Route add/sub through the common add_stub (#196661)
- PyTorch: 806 events in the last 90 days
- PyTorch: 795th Release in the last 90 days
- Previous: earlier the same day · trunk/599651c7aef6f85740f997fcc4aed9642a5f9a03: [ROCm][CD] Add gfx1250 (MI450) to the nightly wheel arch list (#196610)
What happened
MPS had its own add_out_mps / sub_out_mps pair backed by a shared add_sub_lerp_template , which predated the Metal binary-kernel machinery. Registering add_stub from BinaryKernel.mm allows one to unify add and sub together, though still keep shortcut for non-alpha version as it's signiicantly faster thanks to ILP. Slightly changes behavior when alpha == 0 - before it just copied self , but now it runs the ops, which…
Summary assembled by rule from the sources below