viable/strict/1789752186: [MPS] Migrate `softplus` to Metal (#197000)
- PyTorch 近 90 天出现 1156 次
- PyTorch 近 90 天第 1142 次发版
- 上一次:同一天稍早 · viable/strict/1789750220
发生了什么
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…
摘要按规则整理自下方来源原文