PyTorch: [MPS] [Inductor] Compute in float32 after casting to fp16/bf16 (#200559)
Fixes #200545 Inductor for MPS kept fp16/bf16 cast results in half precision.
Executive Summary
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
Hyperscale Open Source & Cloud Infrastructure Review
From an infrastructure engineering, cloud-native scale, and hyperscale governance standpoint: - **Hyperscale Provenance:** Open-sourcing internal frameworks subjects proprietary systems to rigorous public analysis. - **De-facto Standard Cohesion:** Publishing enterprise tooling establishes interoperable specifications across distributed execution. - **Vendor Decoupling:** Platform engineers can inspect underlying telemetry and memory layouts without black-box vendor lock-in.
Impact on the Open Ecosystem
Bridges enterprise engineering scale with independent, reproducible open-source software stacks.