On every device the new runtime makes, Metal's fma on half was the device's float Fma on the
operands held in float, rounded to half by the controlled conversion pair (two OpFConvert
decorated NoContraction). On a chain of 1,024 dependent half4 fmas over 2^19 threads, the
device's 16-bit Fma took 437.5 against 1,818-1,832 us on an RTX 3090, 284 against 377-389 us on an
RX 7900 XTX, and 22.0 against 114.2 ms on a UHD 630 (probe jobs 42069, 42068, 42070).
The translator: a new profile fact, HalfFma. Device::new keeps Measured, the routes it took (the
measured 16-bit Fma on MoltenVK, OpFmaKHR on 16 bits under the controls where shaderFmaFloat16 is
enabled, else the float Fma rounded), which ROWS renders as nothing, so every Device::new
fingerprint and module is unchanged. Device::from_queries takes Native: a half fma is
fma::Route::F16Native, the device's GLSL.std.450 Fma on 16-bit floats, wherever the profile
computes half under the 16-bit float controls (shaderFloat16, with 16-bit RoundingModeRTE,
DenormPreserve and SignedZeroInfNanPreserve); spirv::half_hold then removes its exact conversions,
so the kernel carries no NoContraction pair for it. Elsewhere today's float Fma rounded to half
stays: on the RX 550, without shaderFloat16, and on lavapipe, which does not preserve 16-bit
denormals. OpFmaKHR is not taken on that profile: shaderFmaFloat16 is not one of the queries that
may choose a second form, and the new runtime does not enable VK_KHR_shader_fma.
The note is PrecisionNote::NativeFma, the float fma's. It is per operation, not per width: it
already covers both formats with a bound for each, and Vulkan gives the 16-bit Fma the precision
of the 32-bit one (a multiply and an add, each rounded), so its float bound holds in half. A half
twin would add a Degradation kind to the frozen old runtime and a row to the conformance suite's
native notes for the same statement. Every half fma on from_queries' profile records it, on
either route, and none requires VkProperty::MetalHalfFma.
RADV (Mesa 26.2.6, RX 7900 XTX) does not round the 16-bit Fma once: 1,622,016 lanes of that
chain ended up to 9 half ulp from Metal's (42068). NVIDIA's driver on an RTX 3090 and Intel's
Windows driver on a UHD 630 matched Metal in every lane (42069, 42070). The new runtime's README
lists it among the known gaps of pipeline states.
Tests: engine_arith's a_half_fused_multiply_add_is_the_devices_16_bit_fma_on_from_queries
compiles a half fma through Device::from_queries on five captures: on RADV's, ANV's and NVIDIA's
it is one 16-bit Fma with no NoContraction decoration, no MetalHalfFma requirement and NativeFma
recorded, rounding once on the interpreter; on lavapipe's and vk12-floor's it is the float Fma
rounded, NativeFma recorded, rounding twice. The profile facts test covers HalfFma and its
fingerprint; the fused emit test takes the new route. docs/API.md's native-fma entry and
PrecisionNote::NativeFma's doc state the 16-bit form and its bound.