News: 0001635788

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

RADV Driver Lands Support For VK_KHR_shader_fma

([Radeon] 108 Minutes Ago VK_KHR_shader_fma)


Merged today for what will become Mesa 26.2 next quarter is the Radeon Vulkan driver "RADV" now supporting the VK_KHR_shader_fma extension.

VK_KHR_shader_fma was introduced to the Vulkan spec last year for applications wanting correctly-rounded fused-multiply add (FMA) operations. This is particularly useful for machine learning and scientific computing applications leveraging Vulkan for GPU acceleration and wanting to ensure floating-point accuracy.

The Vulkan extension spec [1]text for VK_KHR_shader_fma explains:

"This extension allows applications to use the SPV_KHR_fma extension to obtain correctly-rounded results for fused-multiply add (fma) operations.

Fused-multiply add is a building block of many high-precision numerical functions. It provides better accuracy than separate operations, because of the removal of the intermediate rounding step, and often costs less than the pair of separate operations.

Vulkan currently exposes an fma primitive that can give the reduced cost, but it is not guaranteed to be a fused operation, so the accuracy cannot be relied on. For applications which require the high accuracy, therefore, the operation must be emulated or the algorithm changed so as not to require fma. This is often vastly more costly, even though fma is supported in much of the underlying hardware."

Thanks to Georg Lehmann with [2]this merge , the Mesa RADV Vulkan driver now supports VK_KHR_shader_fma.



[1] https://docs.vulkan.org/refpages/latest/refpages/source/VK_KHR_shader_fma.html

[2] https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41649



There's no point in being grown up if you can't be childish sometimes.
-- Dr. Who