viable/strict/1791827615: [MPS] [Inductor] Compute in float32 after casting to fp16/bf16 (#200559)
- PyTorch: 2211 events in the last 90 days
- PyTorch: 2182th Release in the last 90 days
- Previous: earlier the same day · trunk/605260d09526b2fad33658892a8eab2750665041
What happened
Fixes #200545 Inductor for MPS kept fp16/bf16 cast results in half precision. With bf16 it fails to compile because metal abs has no bfloat overload (pretty weird 🤔) Fix also includes one for fp16 x.half().log1p() returns 0 for small x , so we match CPU and CUDA and use float32 for fp16 as well. Pull Request resolved: #200559 Approved by: https://github.com/malfet
Summary assembled by rule from the sources below