Vulkan 1.4.329 is now available with one notable new extension in tow.
Besides a handful of documentation clarifications/corrections, Vulkan 1.4.329 brings with it one new extension: VK_KHR_shader_fma.
Vulkan’s new VK_KHR_shader_fma was contributed by a Broadcom engineer and is for exposing SPIR-V’s SPV_KHR_fma extension to shaders for correctly-rounded results of Fused-Multiply Add (FMA) operations.
The new extension 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.”
More details for those interested via this Vulkan-Docs commit.
VK_KHR_shader_fma support can already be found in today’s NVIDIA Vulkan driver beta updates. There is also a pending Mesa merge request for adding this new Vulkan FMA extension to the Radeon RADV driver.