From fe5999dfbff619ae5422cfad28430fd1588b75be Mon Sep 17 00:00:00 2001 From: itchyfeetleech <169226071+itchyfeetleech@users.noreply.github.com> Date: Mon, 19 Oct 2026 21:03:34 +1300 Subject: [PATCH] engine: README: the opt-in M_RESIDUAL_F32, D4R_RR2_UNGUARDED and D4R_RR2_POOLED builds measured Signed-off-by: itchyfeetleech <169226071+itchyfeetleech@users.noreply.github.com> --- engine/README.md | 9 +++++++++ engine/compile_rr2.py | 5 +++-- engine/rr/README.md | 13 +++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/engine/README.md b/engine/README.md index adf16b1..6ce22c0 100644 --- a/engine/README.md +++ b/engine/README.md @@ -1110,6 +1110,15 @@ reconstruction tile tiers and the stress inputs). The network layers are separated by an execution-only barrier (`emptyStage`). A memory barrier there gives the same output and costs about 60 us (M 1520 -> 1592), so it stays. +### `M_RESIDUAL_F32` (opt-in, 2026-10-19) + +`M_RESIDUAL_F32=1 python3 engine/compile_m.py ...` keeps the residual stream in f32 across the MLP's 32-channel chunks +and rounds it to binary16 once after them, instead of after every chunk. It needs the relaxed build (not +`M_EXACT=1`) and is off by default. 1280x720 -> 1440p: M 1521 -> 1410 us, L 2195 -> 2077. Against the default build, +final RGB, peak 1: 43 - 46 dB (L 45 - 49) on smooth frames, 17 - 18 dB on noise. The exact build is as far from the +default, so this moves no further from NVIDIA's arithmetic than `M_RELAXED` already does. Not checked against an +NVIDIA card. + ## Preset L (runtime and shim path exist; experimental) Preset L (render preset 12, NVIDIA's model for Ultra Performance) is M's pipeline with its own input, expansion and diff --git a/engine/compile_rr2.py b/engine/compile_rr2.py index 7fcfef7..0d8fed8 100644 --- a/engine/compile_rr2.py +++ b/engine/compile_rr2.py @@ -80,8 +80,9 @@ GROUP = int(os.environ.get('D4R_RR2_GROUP', '1')) # D4R_RR2_SPLIT=1 / 0 forces the gather pass / the single shader. SPLIT = os.environ.get('D4R_RR2_SPLIT', '0' if RELAXED >= 3 and 'enc0' in ONE_WAVE else '1') != '0' # The pooled histories as RGBA32F holding q / 1023, as ZLUDA backs them (16 bytes a pixel). D4R_RR2_POOLED=rgb10_a2 -# makes them real UNORM 10:10:10:2 images (0.1 ms faster at 4K), but the hardware's bilinear filter then rounds -# differently: identical at 3x and 2x scaling, 44 - 51 dB on temporal frames at 1.5x (capFQ, 2026-10-13) +# makes them real UNORM 10:10:10:2 images (0.1 ms faster at 4K, 70 MB less), but the hardware's bilinear filter then +# rounds differently: identical at 3x and 2x scaling, 44 - 51 dB on temporal frames at 1.5x (capFQ, 2026-10-13); on +# random-motion noise also at 2x (29 dB on the history frames, engine/rr/README.md) POOLED = os.environ.get('D4R_RR2_POOLED', 'rgba32f') SURFACES = {'dec0_1': {176: 'rgba8_snorm', 184: 'rgba8', 192: 'rgba8'}, 'post': {120: POOLED}, 'pooled': {8: POOLED}} # D4R_RR2_UNGUARDED=1 (opt-in, D4R_RR_RELAXED=3 only): the translated code (encoder 0's and decoder 0's per-pixel parts, diff --git a/engine/rr/README.md b/engine/rr/README.md index e0ac464..3e1f6a9 100644 --- a/engine/rr/README.md +++ b/engine/rr/README.md @@ -629,3 +629,16 @@ byte-identical to the previous model on the replay and stress inputs, at levels total with an atomic add and the last block finishing. It needs `shaderBufferInt64Atomics`, which vkd3d-proton enables; the shim reads the device's features through `GetDeviceFeatures`. Without it, or with a model that has no `exposure_f2.spv`, the two passes run (`D4R_RR_TEST_NO_INT64_ATOMICS=1` forces them). Exposure 25.2 -> 14.9 us. + +### Opt-in builds for preset F (2026-10-19) + +Against the default build, presented image, RGB, peak 1, 1280x720 -> 1440p. For scale, the exact build +(`D4R_RR_RELAXED=0`) is 43.0 - 44.4 dB from the default. + +- `D4R_RR2_UNGUARDED=1` (level 3 only): the translated code (encoder 0's and decoder 0's per-pixel parts, the output + passes) without its exactness guards: no `precise`, no opaque zero on binary16 stores, no `spv_exact_convert.py`. + 56.0 dB on the reset frame, then 43.0 - 45.6 dB, as far from the exact build as the default is. Frame 3.526 -> 3.501 + ms. +- `D4R_RR2_POOLED=rgb10_a2` (since 2026-10-13): the pooled histories as UNORM 10:10:10:2 images, 31 MB less at 1440p. + Identical at 1280x720 -> 1440p and on reset frames; 43.7 - 47.2 dB on the history frames at 1114x626 -> 1080p and + 28.8 dB with random motion. Frame 3.526 -> 3.484 ms, 3.456 with `D4R_RR2_UNGUARDED=1` as well.