viable/strict/1791827615: [MPS] [Inductor] Compute in float32 after casting to fp16/bf16 (#200559)
- PyTorch 近 90 天出现 2213 次
- PyTorch 近 90 天第 2184 次发版
- 上一次:同一天稍早 · viable/strict/1791826217: [BE][MPS] Remove test_mps.py tests already covered by OpInfo (#200579)
发生了什么
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
摘要按规则整理自下方来源原文