From f8db87d844c9a2afefb552863751f5873ff764e3 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Mon, 23 Nov 2026 17:20:08 -0800 Subject: [PATCH] rt README: a kernel that keeps the reconvergence mode is a known gap under AMDVLK The two commits before this one drop the reconvergence mode where every group operation of an entry stands in a block the pass proves uniform for the threadgroup, outside a re-entered loop. A kernel whose SIMD-group operation stands in a block it does not prove uniform keeps the mode. Five kernels of one recorded session do: each loops on a count loaded from a constant buffer less a per-thread offset, which no fact about the 64-thread group decides (a card-free read of their controlling conditions, m3-max-72465). AMDVLK runs them slower with the mode, so the line goes where a user reads it, with its measurements. RADV runs that play in the same compute time with the mode on such kernels alone as with it on every kernel (m3-max-72436). Evidence for the change, base (development) against change, each with its job: - Values, compare-plays with buffer dumps: - AMDVLK 2025.Q2.1, Radeon 780M: m3-max-72441, 24 command buffers to frame 349, 0 of 1,749 buffers differ. m3-max-72445, the 10 command buffers of the barrier-only states first dispatched after 349, to 378: 1 of 68 differs (cb 173676, obj 168800). That buffer is the output of an atomic-append kernel (94cc#7) that writes 2 of each 12-byte record's 3 words at the index its atomic returns. Its record test, base against change, is m3-max-72491. - RADV (Mesa 26.2.6), Radeon 780M: m3-max-72436, 0 of 1,749. - NVIDIA 620.70.06, RTX 3090, Managed device copies read back: m3-max-72434. Base against change, and base against base2, show the same 3 atomic-append buffers apart and no other. - Intel Mesa 26.2.6, Iris Xe: m3-max-72460, 0 of 1,749. - Timing: AMDVLK m3-max-72427, the play's compute to frame 349 166.52 s (base) to 59.22 s (change). Intel m3-max-72460: every window at or below the slower base arm (GT at 1500 MHz in every arm). NVIDIA m3-max-72402 and m3-max-72420: no effect at the card's resolution. - Golden table, Linux: m3-max-72447, 23,698 cells, 1,560 differ in the reconvergence mode alone and 0 in anything else. The macOS-only golden fixtures (the typed-pointer .air.ll ones, 580 SKIPPED rows on Linux) are unaudited here; they are audited on the M3 before the bless. - Checks: m3-max-72446 on the change's two commits over 14c6cab653 (fmt, clippy, Rustdoc, nextest: only the golden table's bless due, 1,560 cells under SEMANTICS 2300 against the table's 2298). This commit's check is run at this commit. --- crates/metal2vulkan-runtime/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/crates/metal2vulkan-runtime/README.md b/crates/metal2vulkan-runtime/README.md index 15874d141..a1489b77f 100644 --- a/crates/metal2vulkan-runtime/README.md +++ b/crates/metal2vulkan-runtime/README.md @@ -3721,6 +3721,20 @@ cache is answered compile-required on both. (`Error::Translation`): the only use of the member the translator admits is an indirect command's pipeline setter, which is `Unsupported{GpuEncodedIndirectCommands, NotImplemented}` (`tests::engine_indirect_commands`). +- A kernel keeps the reconvergence mode (`MaximallyReconvergesKHR`, where the device lists + `shaderMaximalReconvergence`) when one of its SIMD-group operations stands in a block the + translator does not prove uniform for the threadgroup, as in a loop whose trip count is a count + read from a buffer at run time less a per-thread offset. AMD's open Linux driver (AMDVLK + 2025.Q2.1, LLPC) on a Radeon 780M runs such kernels slower with the mode than the same modules + without it. Mesa's RADV (26.2.6) on the same chip runs the session below in the same compute time + with the mode on such kernels alone as with it on every kernel (21.05 s against 21.03 s and + 21.06 s to frame 349, m3-max-72436). In one recorded session on that card, five kernels of that + shape keep the mode. Under AMDVLK the play's compute GPU time to frame 349 was 59.22 s + (m3-max-72427), 5.8% above the 55.98 s of the same play with the mode removed from every kernel, a + measurement and not a form the runtime has (m3-max-72248). In one span of that play, where the + five took 4.40 s timed per dispatch with the same five modules (m3-max-72362), compute was 11.67 s + against 9.03 s without the mode. Test: the translator's + `tests::engine_reconvergence_together::a_shuffle_outside_uniform_control_flow_keeps_the_mode`. ## Render pipeline states