Runtime README: the half simdgroup tree's four forms and their cost on three cards, as a known gap

The gap named the float route alone, measured by forcing it on an RTX 2080 with the shuffle tree
since deleted. It now states the tree's four forms and their two choosers: the SIMD-group
operations query (a subgroup tier takes one clustered reduction per round, the emulated tier its
workgroup tree) and the 16-bit floats query (16 bits under the 16-bit float controls, float
rounded to half each round elsewhere). It also states what the tree costs against the device's
reduction of the float values rounded once, which was faster and not Metal's answer.

Rows: a kernel of two simd_sum of half4 on the subgroup tier at 16 bits, GPU time at the 50th
percentile over three alternated rounds with a same-arm pair (carry bin/hsum2: base 7fe0a001 =
development e1e6f52848's product, clus 8cb0caa5 = the clustered tree, eaf11e5c63 before this
series' rebase), exclusive, a device line in every run:
- Iris Xe (RPL-P, ANV), m3-max-81581: 1274.5-1317.9 us against 825.7-880.9 us, medians 1275.2
  and 827.8, +54.0%.
- RTX 2080, m3-max-81598: 805.0-808.3 us against 660.1-665.0 us, medians 807.5 and 662.6,
  +21.9%.
- RX 7900 XTX (RADV NAVI31), m3-max-81839: 7525.8-7538.0 us against 7474.9-7478.9 us, medians
  7526.85 and 7475.55, +0.7%.
The Iris is the slowest GPU, and the clustered form is the fastest right form on it; the 16-bit
shuffle tree ran 2278 us there. The loss on the others is this gap, as ruled.

Verified: docs only; the rows are those jobs'.
This commit is contained in:
Anees Iqbal committed 2026-12-02 22:40:58 -08:00
1 parent 3457e092cb
commit ee6911e100
1 file changed
+13 -9
+13 -9
View File
@@ -4227,15 +4227,19 @@ 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 `half` simdgroup sum or product is Metal's tree of rounded `half` operations on every device,
where the device's reduction of the `float` values rounded once, which it replaces, was faster and
not Metal's answer. The tree has four forms, chosen by two queries: the SIMD-group operations
query gives a subgroup tier one clustered reduction (`OpGroupNonUniformFAdd` or
`OpGroupNonUniformFMul`, `ClusteredReduce`) for each of the tree's five rounds, and the emulated
tier its workgroup tree; the 16-bit floats query holds either at 16 bits where the module computes
`half` under the 16-bit float controls, and in `float` rounded to `half` each round elsewhere. The
forms are those fastest on the slowest GPU measured, an Iris Xe. For a kernel of two `simd_sum` of
`half4`, on the subgroup tier at 16 bits, GPU time at the 50th percentile over three alternated
rounds against the reduction it replaced: an Iris Xe (ANV) 1274.5-1317.9 us against 825.7-880.9 us
(+54.0% between the medians, m3-max-81581), an RTX 2080 805.0-808.3 us against 660.1-665.0 us
(+21.9%, m3-max-81598), and an RX 7900 XTX (RADV) 7525.8-7538.0 us against 7474.9-7478.9 us
(+0.7%, m3-max-81839).
- 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