viable/strict/1789752186: [MPS] Migrate `softplus` to Metal (#197000)
- PyTorch: 1156 events in the last 90 days
- PyTorch: 1142th Release in the last 90 days
- Previous: earlier the same day · viable/strict/1789750220
What happened
softplus and softplus_backward are structured TensorIterator ops whose only extra state is two scalars, so they fit the unary/binary-with-params Metal harness that elu already uses: two functors in ActivationKernel.metal plus stub registrations replace ~150 lines of MPSGraph. beta and threshold are carried as floats in a single non-templated SoftplusParams , since opmath is float for all three supported dtypes, matc…
Summary assembled by rule from the sources below