The RADV driver, the open source implementation of Vulkan for Radeon GPUs, has added support for the VK_KHR_shader_fma extension. This extension enables FMA (fused multiply-add) operations with correct rounding, offering greater precision in calculations without increasing computational load. It is a significant advancement for machine learning and scientific computing, where every decimal matters.
Mathematical precision without performance penalty 🎯
The VK_KHR_shader_fma extension enables FMA instructions that fuse multiplication and addition into a single operation with exact rounding. This avoids the cumulative errors typical of separate operations. RADV already implements it for Radeon, and NVK, the driver for NVIDIA, has also enabled it, improving OpenCL performance on those GPUs. Both improvements will arrive with Mesa 26.2, allowing AI and scientific simulation developers to fine-tune their calculations without touching the hardware.
Now your decimals have rights too 😄
Finally, floating-point numbers will stop feeling discriminated against. With FMA, every multiplication and addition gets along, without half-hearted roundings that ruin your quantum physics simulations. And hey, NVK joining the party too is like seeing Linux and NVIDIA sharing a tablecloth. That said, don't expect miracles: if your code is already a mess, not even FMA can save it. But at least now, the errors will be your fault, not the driver's.