Runtime README: the half simdgroup tree held in float, on devices outside the 16-bit float controls, as a known gap

A half simdgroup sum or product is Metal's tree of rounded half operations on every device.
Which form the tree takes is the 16-bit floats query (narrow::half_controls, read through
group::sixteen_bit_half by HalfTree and workgroup::combine): a module that computes half under
the 16-bit float controls holds the tree at 16 bits; every other module holds it in float and
rounds each step to half. Of the committed profiles, moltenvk-m3 (shaderFloat16 but controls the
module cannot declare), nvidia-pascal-linux (no shaderFloat16) and runtime-floor (no
shaderFloat16) take the float route (engine_native_half's
a_controlled_conversion_rounds_half_where_the_float_controls_allow asserts the split); the ANV,
RADV, RTX 50 series and lavapipe profiles take the 16-bit one. It is that query's existing second
form, not a new one: a module under the controls never reaches the float tree, since both
callers test the same predicate.

The float route's cost goes in the pipeline states' known gaps with its rows, the closest
measure: that form forced on an RTX 2080 (which itself takes the 16-bit route) for a real kernel
of two simd_sum of half4, GPU time at the 50th percentile over three alternated rounds,
m3-max-81173: 691.6-695.4 us against 659.1-660.7 us for the reduction it replaces (+5.1%), where
the 16-bit tree ran 613.3-614.1 us (-7.0%). The line says it applies to that route alone.

Verified: docs only; the rows are m3-max-81173's.
This commit is contained in:
Anees Iqbal committed 2026-12-02 22:40:49 -08:00
1 parent c35952d868
commit faf822ee57
1 file changed
+9
+9
View File
@@ -4227,6 +4227,15 @@ cache is answered compile-required on both.
### Known gaps of pipeline states
- A `half` simdgroup sum or product is Metal's tree of rounded `half` operations on every device.
Where the module does not compute `half` under the 16-bit float controls (the 16-bit floats
query: a device without `shaderFloat16`, as NVIDIA's Pascal cards, or whose controls the module
cannot declare, as MoltenVK on the M3), the tree holds its partials in `float` and rounds every
step to `half`; that route alone. The closest measure, that form forced on an RTX 2080 for a
kernel of two `simd_sum` of `half4` (GPU time at the 50th percentile, three alternated rounds,
m3-max-81173): 691.6-695.4 us against 659.1-660.7 us for the device's reduction of the `float`
values rounded once (+5.1%), where the tree at 16 bits, the route of a device under the
controls, ran 613.3-614.1 us (-7.0%).
- A kernel bound below its argument's alignment (an argument of 8 or 16 bytes at a multiple of 4)
runs a relaxed form of the kernel, whose accesses of that buffer claim 4-byte alignment. A
build that took that form for every such argument, bound so or not, ran the harness's four