Runtime README: the extended-range decode's price as a select, and the largest guest function's first creation with it

What: the known gaps of textures say what the straight-line decode costs.
- The bullet that described the per-site branch and its price now describes the select: every
  float sample, gather and read maps its lanes and selects where the word names BGR10_XR or
  BGRA10_XR; a texture of another format pays the arithmetic and the select, and a
  robustness-bounded read its in-range test. Its GPU-time price against the branch, base
  dc3e7e5add against 14d30efdfe, four alternated rounds' p50 medians: RX 7900 XTX (RADV,
  m3-max-86672) +0.3% sampling, +2.7% constexpr_sampling, +0.8% texture_read; Iris Xe (ANV, Mesa
  26.2.6, m3-max-86676) +0.5%, +1.3%, -0.2%; RTX 3090 (m3-max-86692) +0.1%, +0.8%, 0.0%. It says
  these predate 571a22f97a's uncontracted difference.
- A new bullet: one guest fragment function of 318 float samples, first created with every driver
  cache off, takes 23 s on KosmicKrisp (Mesa 26.3.1, Apple M3 Max; m3-max-86686 at 14d30efdfe and
  m3-max-86724 at 571a22f97a) and 9.2 s on ANV (Mesa 26.2.6, Iris Xe; m3-max-86719 at 571a22f97a),
  against 14 to 18 s and 4.0 s for the same function without the map (pin W, the same jobs and
  main's three earlier KosmicKrisp tables). Both are past the 5 s ceiling, as at W.

Why: the planner's ruling for pin Z: if Z ships the select form, its creation cost is stated as
measured, beside the row already owed for that variant.

Verified: the figures are the named jobs' lines; KosmicKrisp's 0 MTLLibrary failures at both W and
571a22f97a (m3-max-86724). Docs only; no code changes.
This commit is contained in:
Anees Iqbal committed 2026-12-04 12:11:12 -08:00
1 parent e64cf97918
commit e849ae4665
1 file changed
+15 -11
+15 -11
View File
@@ -2377,17 +2377,21 @@ once, as it is made, with no lock, and never rewritten for layouts.
### Known gaps of textures
- Every `float` or `half` sample, gather and read of a sampled colour image tests its texture's
word for `BGR10_XR` and `BGRA10_XR` and maps their codes in a branch (docs/API.md): on a texture
of any other format the read pays the word's test and the branch. In the compute harness's GPU
time, with and without the branch alternated in one run, `sampling`,
`sampling_distinct_512x512x16` and `texture_read` took +0.4%, 0.0% and -0.2% (medians of 5
rounds) on an Iris Xe (Mesa 26.2.6), 0.0%, 0.0% and +3.0% (medians of 3 rounds; `texture_read`'s
own rounds without the branch spread 3.2%) on an RTX 3090 (NVIDIA 620.70.06), and -0.2%, 0.0%
and -0.4% (3 rounds) on an RX 7900 XTX (Mesa 26.2.6). These were measured on earlier forms of
the branch: the RTX 3090's and the RX 7900 XTX's before the map's operations were kept
uncontracted (`NoContraction`, on every device), and all three before a gather took its nearest
code. Both changes add work inside the branch alone.
- Every `float` or `half` sample, gather and read of a sampled colour image maps its lanes as
`BGR10_XR` and `BGRA10_XR` codes and selects the mapped lanes where its texture's word names one
of them (docs/API.md), with no branch: on a texture of any other format the read pays the map's
arithmetic and the select, and a read the device's robustness bounds pays its in-range test.
In the compute harness's GPU time, against the form that branched on the word, alternated in one
run (medians of 4 rounds' p50s), `sampling`, `constexpr_sampling` and `texture_read` took +0.3%,
+2.7% and +0.8% on an RX 7900 XTX (RADV, m3-max-86672), +0.5%, +1.3% and -0.2% on an Iris Xe
(ANV, Mesa 26.2.6, m3-max-86676), and +0.1%, +0.8% and 0.0% on an RTX 3090 (m3-max-86692).
These were measured before a sample's difference `w - 384` was kept uncontracted, which costs
a device that would fuse it into the product before it one operation a sample.
- A function with many `float` samples pays that map at each: one guest fragment function of 318
of them is first created, with every driver cache off, in 23 s on KosmicKrisp (Mesa 26.3.1, an
Apple M3 Max; m3-max-86686 and m3-max-86724) and 9.2 s on ANV (Mesa 26.2.6, an Iris Xe;
m3-max-86719), where the same function without the map took 14 to 18 s and 4.0 s. Both are past
the 5 s creation ceiling the corpus tools check, as the function was without the map.
- A sample of a `BGR10_XR` or `BGRA10_XR` texture past its edge through a sampler's
`ClampToBorderColor` or `ClampToZero` reads the device's border colour as a code (opaque white
as `1.2529`, `BGRA10_XR`'s `1.2549`; black as `-0.7529`) where Metal reads 0 or 1, and a linear