Compare tier C references against a verified 32-wide draw (TEST-W64G-REF-DEFAULT) #1060

Merged
sodove merged 2 commits from upstream-pr/1060 into main 2026-11-29 14:37:18 +00:00
sodove commented 2026-11-24 17:28:26 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-24T17:28:26Z.


Claimed as TEST-W64G-REF-DEFAULT in #14.

What and why

With a saved 64-lane reference and a 64-wide default, the tier C checker could report a failure after a successful comparison of the forced 32- and 64-wide draws. It tested the default draw a second time and required a 64-wide result to differ from its own reference.

Use the confirmed 32-wide draw for the cross-width comparison. The default draw is also usable when the harness reports a fixed 32-wide device, including for vertex or geometry stages without an applied width request. A 64-only or unverified default cannot complete the comparison. The checks for partition-invariant words and for a difference in the partition-dependent words still apply.

Tested

  • Windows 11, Python 3.12.10. CPU replay reproduced the false failures before the fix. The three focused reference, probe and argument suites passed (13 tests). The matrix includes dual-width devices with both defaults, fixed 32/64, and a default whose width cannot be established.
  • On an RTX 5070 Ti (610.74, subgroup range 32–32), the hand-written A and B fragment fixtures passed. Tier C passed against an explicitly CPU-generated 64-lane control and skipped when it was absent. Native 64-wide cases were verified by CPU replay.
  • All 10 wave64 fixture classification and checker tests passed with LLVM and SPIRV-Tools available. The translator semantic suite passed all 6,168 tests across 470 files.
  • The game-data check passed for both changed files.

AI-assisted: yes, OpenAI Codex.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5477109726 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1060). Originally posted by [sodove](https://github.com/sodove) on 2026-11-24T17:28:26Z. --- Claimed as `TEST-W64G-REF-DEFAULT` in [#14](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7139030018). ### What and why With a saved 64-lane reference and a 64-wide default, the tier C checker could report a failure after a successful comparison of the forced 32- and 64-wide draws. It tested the default draw a second time and required a 64-wide result to differ from its own reference. Use the confirmed 32-wide draw for the cross-width comparison. The default draw is also usable when the harness reports a fixed 32-wide device, including for vertex or geometry stages without an applied width request. A 64-only or unverified default cannot complete the comparison. The checks for partition-invariant words and for a difference in the partition-dependent words still apply. ### Tested - Windows 11, Python 3.12.10. CPU replay reproduced the false failures before the fix. The three focused reference, probe and argument suites passed (13 tests). The matrix includes dual-width devices with both defaults, fixed 32/64, and a default whose width cannot be established. - On an RTX 5070 Ti (610.74, subgroup range 32–32), the hand-written A and B fragment fixtures passed. Tier C passed against an explicitly CPU-generated 64-lane control and skipped when it was absent. Native 64-wide cases were verified by CPU replay. - All 10 wave64 fixture classification and checker tests passed with LLVM and SPIRV-Tools available. The translator semantic suite passed all 6,168 tests across 470 files. - The game-data check passed for both changed files. AI-assisted: yes, OpenAI Codex.
Sangonapou commented 2026-11-24 18:15:42 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Sangonapou on 2026-11-24T18:15:42Z.


Tested fc5d08b8 on NVIDIA GeForce RTX 3080 Ti Laptop (Ampere, fixed subgroup 32..32), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 Pro (build 26300): pass

Runtime built at this head with scripts\build_runtime.ps1 (MSVC 19.51); shaders from runtime/test/shaders/build.py (llvm-mc 23.1.6, SPIRV-Tools 2026.4; 284 translated, 284 pass spirv-val). No game files.

  • tests/test_w64_graphics_reference.py: 5 OK.
  • w64_graphics.py <spirv dir> runtime\build without W64G_REF: exit 0; tier A 9/9 and tier B 8/8 ok; all 12 tier C SKIP (tier C needs verified 32- and 64-wide draws; W64G_REF can supply the 64-wide draw). So on a fixed 32-wide device with no 64-wide reference it skips rather than reporting a failure, as described. I have no 64-wide device to make a W64G_REF capture; with one, this card could supply the verified 32-wide side of the comparison.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7140391193 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1060#issuecomment-7140391193). Originally posted by [Sangonapou](https://github.com/Sangonapou) on 2026-11-24T18:15:42Z. --- Tested fc5d08b8 on NVIDIA GeForce RTX 3080 Ti Laptop (Ampere, fixed subgroup 32..32), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 Pro (build 26300): pass Runtime built at this head with `scripts\build_runtime.ps1` (MSVC 19.51); shaders from `runtime/test/shaders/build.py` (`llvm-mc` 23.1.6, SPIRV-Tools 2026.4; 284 translated, 284 pass spirv-val). No game files. - `tests/test_w64_graphics_reference.py`: 5 OK. - `w64_graphics.py <spirv dir> runtime\build` without `W64G_REF`: exit 0; tier A 9/9 and tier B 8/8 `ok`; all 12 tier C `SKIP (tier C needs verified 32- and 64-wide draws; W64G_REF can supply the 64-wide draw)`. So on a fixed 32-wide device with no 64-wide reference it skips rather than reporting a failure, as described. I have no 64-wide device to make a `W64G_REF` capture; with one, this card could supply the verified 32-wide side of the comparison.
sodove commented 2026-11-24 18:24:55 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-24T18:24:55Z.


Thanks for testing the exact head on Ampere. The 9 tier A and 8 tier B passes plus 12 tier C skips are the expected result on a fixed-32 device without a saved 64-lane reference.

For anyone looking for the other half of the comparison, #1075 has a relevant Windows result on a Granite Ridge iGPU. It ran the native 64-wide compute fixtures, but the driver could not require a 64-wide fragment subgroup. That run did not exercise w64_graphics.py. A graphics reference for this PR still needs a confirmed 64-wide draw for the stage being compared.

AI-assisted: yes (OpenAI Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7140612198 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1060#issuecomment-7140612198). Originally posted by [sodove](https://github.com/sodove) on 2026-11-24T18:24:55Z. --- Thanks for testing the exact head on Ampere. The 9 tier A and 8 tier B passes plus 12 tier C skips are the expected result on a fixed-32 device without a saved 64-lane reference. For anyone looking for the other half of the comparison, #1075 has a relevant Windows result on a Granite Ridge iGPU. It ran the native 64-wide compute fixtures, but the driver could not require a 64-wide fragment subgroup. That run did not exercise `w64_graphics.py`. A graphics reference for this PR still needs a confirmed 64-wide draw for the stage being compared. AI-assisted: yes (OpenAI Codex).
sodove commented 2026-11-24 18:46:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by sodove on 2026-11-24T18:46:24Z.


Tested fc5d08b8 on two physical GPUs in the same Windows 11 26100.7623 system: a Ryzen 5 9600X integrated Radeon (Granite Ridge, PCI 1002:13c0, AMD 26.11.2 / 32.0.21045.29003) and an RTX 5070 Ti (610.74). Both adapters were selected explicitly. I built the native harnesses at this head and translated and validated 49 repository-authored synthetic fixtures.

The Radeon reports subgroup 32–64, default 64. Only compute supports requesting a specific size. All 18 native wave64 compute readbacks matched. On the default pixel, vertex and geometry lane-ID probes, the Radeon actually produced lane IDs 0–63 in each stage. The RTX reports a fixed width of 32.

Device and reference source Tier A Tier B Tier C
RTX, no reference 9 pass 8 pass 12 skip
RTX, Radeon files written by stock W64G_SAVE_REF 9 pass 8 pass 4 pass, 8 skip
RTX, same files plus eight externally captured Radeon default fragment readbacks 9 pass 8 pass 12 pass

Stock saving produced nine vertex/geometry references, including four tier C cases. For the extra eight fragment cases I captured the output of the unmodified harness on the Radeon twice per fixture. Each pair was identical and passed the fixture's invariant checks. These are default draws: the fragment modules were SPIR-V 1.5, the stage flags were zero, and the device reports a default subgroup size of 64. The pixel lane-ID fixture independently exposed all 64 lanes. I did not treat an unhonoured size request as a forced fragment draw. Vulkan subgroup-size rules

Regression control on hardware: gave the same twelve tier C references back to the Radeon. The parent checker (32950551) exited 1 with twelve false failures because it compared the default draw against itself. This PR exited 0 and skipped all twelve, since the Radeon had no verified 32-wide draw. Feeding those same references to the RTX passed all twelve, as shown above.

Synthetic fixtures only. Results and counts only. AI-assisted: yes (OpenAI Codex).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7141131001 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1060#issuecomment-7141131001). Originally posted by [sodove](https://github.com/sodove) on 2026-11-24T18:46:24Z. --- Tested `fc5d08b8` on two physical GPUs in the same Windows 11 26100.7623 system: a Ryzen 5 9600X integrated Radeon (Granite Ridge, PCI 1002:13c0, AMD 26.11.2 / 32.0.21045.29003) and an RTX 5070 Ti (610.74). Both adapters were selected explicitly. I built the native harnesses at this head and translated and validated 49 repository-authored synthetic fixtures. The Radeon reports subgroup 32–64, default 64. Only compute supports requesting a specific size. All 18 native wave64 compute readbacks matched. On the default pixel, vertex and geometry lane-ID probes, the Radeon actually produced lane IDs 0–63 in each stage. The RTX reports a fixed width of 32. | Device and reference source | Tier A | Tier B | Tier C | |---|---:|---:|---:| | RTX, no reference | 9 pass | 8 pass | 12 skip | | RTX, Radeon files written by stock `W64G_SAVE_REF` | 9 pass | 8 pass | 4 pass, 8 skip | | RTX, same files plus eight externally captured Radeon default fragment readbacks | 9 pass | 8 pass | 12 pass | Stock saving produced nine vertex/geometry references, including four tier C cases. For the extra eight fragment cases I captured the output of the unmodified harness on the Radeon twice per fixture. Each pair was identical and passed the fixture's invariant checks. These are default draws: the fragment modules were SPIR-V 1.5, the stage flags were zero, and the device reports a default subgroup size of 64. The pixel lane-ID fixture independently exposed all 64 lanes. I did not treat an unhonoured size request as a forced fragment draw. [Vulkan subgroup-size rules](https://docs.vulkan.org/spec/latest/chapters/shaders.html#shaders-varying-subgroup-size) **Regression control on hardware:** gave the same twelve tier C references back to the Radeon. The parent checker (`32950551`) exited 1 with twelve false failures because it compared the default draw against itself. This PR exited 0 and skipped all twelve, since the Radeon had no verified 32-wide draw. Feeding those same references to the RTX passed all twelve, as shown above. Synthetic fixtures only. Results and counts only. AI-assisted: yes (OpenAI Codex).
OreoFR commented 2026-11-28 21:46:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:46:31Z.


Verified by OreoFR

  • Base: main 5cb45921e + PR head b2a7dabd1; green run in a merge package of 2 PRs, no new ctest failure vs main
  • Test: python -I tests/test_w64_graphics_reference.py ; package ctest
  • Red on main: 2 ERROR (AttributeError _device_range, a symbol the test patches and the PR creates). Test adapted to main's names: 3 FAIL ("tier C but the run equals the 64-lane reference: the detector is wrong": the default 64 draw stands in for the 32 draw), so the defect is on main
  • Green with the PR: 8 OK, package with no new ctest failure
  • Verdict: READY
  • Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246261952 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1060#issuecomment-7246261952). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-28T21:46:31Z. --- **Verified by OreoFR** - Base: main `5cb45921e` + PR head `b2a7dabd1`; green run in a merge package of 2 PRs, no new ctest failure vs main - Test: `python -I tests/test_w64_graphics_reference.py ; package ctest` - Red on main: 2 ERROR (AttributeError _device_range, a symbol the test patches and the PR creates). Test adapted to main's names: 3 FAIL ("tier C but the run equals the 64-lane reference: the detector is wrong": the default 64 draw stands in for the 32 draw), so the defect is on main - Green with the PR: 8 OK, package with no new ctest failure - Verdict: READY - Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11 AI-assisted (Claude Code, Claude Opus 5.5).
zmasi commented 2026-11-29 01:34:59 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T01:34:59Z.


Independent Windows 11 + NVIDIA GeForce RTX 3090 Verification (b2a7dabd10 merged onto main 5825b02ff8)

Environment: Windows 11 (10.0.26200), MSVC 19.44.35228, Python 3.12.10 (-I), llvm-mc (gfx1030), SPIRV-Tools / VK_LAYER_KHRONOS_validation 1.4.363.1 (LEONIDA_VK_VALIDATION=1), physical NVIDIA GeForce RTX 3090 (Ampere, driver 610.88, Vulkan 1.4, fixed subgroup 32..32). Synthetic wave64 graphics fixtures only; no game files.

Results — PASS (0 validation errors)

  • Red on main (5825b02ff8):
    • Running #1060's tests/test_w64_graphics_reference.py fails on main (AttributeError: _device_range), and reproducing the dual-width (32, 64) case with a 64-wide default draw on main's w64_graphics.check returns the false failure 'tier C but the run equals the 64-lane reference: the detector is wrong'.
  • Green on main + b2a7dabd10:
    • python -I tests/test_w64_graphics_reference.py: 8/8 OK.
    • Live RTX 3090 w64_graphics.py hardware sweep (32 translated shaders, 32/32 spirv-val clean, LEONIDA_VK_VALIDATION=1):
      • Without W64G_REF: 30/30 fixtures exit 0 — Tier A 10/10 ok, Tier B 8/8 ok, Tier C 12/12 SKIP (SKIP (tier C needs verified 32- and 64-wide draws; W64G_REF can supply the 64-wide draw)), 0 validation errors.
      • With W64G_REF 64-lane reference files on fixed-32 RTX 3090 (_device_range == (32, 32)): both forced-32 fragment (ps_w64_c_lane_id) and default-draw vertex (vs_w64_c_lane_id, exercising the size is None + _device_range == (32, 32) path) complete the live Tier C comparison cleanly (check(...) == '', 0 validation errors).

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7248878396 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1060#issuecomment-7248878396). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-29T01:34:59Z. --- ### Independent Windows 11 + NVIDIA GeForce RTX 3090 Verification (`b2a7dabd10` merged onto `main` `5825b02ff8`) **Environment**: Windows 11 (`10.0.26200`), MSVC `19.44.35228`, Python `3.12.10` (`-I`), `llvm-mc` (`gfx1030`), SPIRV-Tools / `VK_LAYER_KHRONOS_validation` `1.4.363.1` (`LEONIDA_VK_VALIDATION=1`), physical **NVIDIA GeForce RTX 3090** (Ampere, driver `610.88`, Vulkan `1.4`, fixed subgroup `32..32`). Synthetic wave64 graphics fixtures only; no game files. #### Results — **PASS (`0` validation errors)** - **Red on `main` (`5825b02ff8`)**: - Running `#1060`'s `tests/test_w64_graphics_reference.py` fails on `main` (`AttributeError: _device_range`), and reproducing the dual-width `(32, 64)` case with a `64`-wide default draw on `main`'s `w64_graphics.check` returns the false failure `'tier C but the run equals the 64-lane reference: the detector is wrong'`. - **Green on `main` + `b2a7dabd10`**: - `python -I tests/test_w64_graphics_reference.py`: **`8/8 OK`**. - **Live RTX 3090 `w64_graphics.py` hardware sweep (`32` translated shaders, `32/32` `spirv-val` clean, `LEONIDA_VK_VALIDATION=1`)**: - Without `W64G_REF`: **`30/30` fixtures exit `0`** — Tier A **`10/10 ok`**, Tier B **`8/8 ok`**, Tier C **`12/12 SKIP`** (`SKIP (tier C needs verified 32- and 64-wide draws; W64G_REF can supply the 64-wide draw)`), `0` validation errors. - With `W64G_REF` 64-lane reference files on fixed-`32` RTX 3090 (`_device_range == (32, 32)`): both forced-`32` fragment (`ps_w64_c_lane_id`) and default-draw vertex (`vs_w64_c_lane_id`, exercising the `size is None` + `_device_range == (32, 32)` path) complete the live Tier C comparison cleanly (`check(...) == ''`, `0` validation errors). AI-assisted.
MoonEyes commented 2026-11-29 14:37:21 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T14:37:21Z.


Merged at head b2a7dab. Tested on this head by OreoFR, zmasi: the new test fails on main and passes with the PR (results in the comments above). AI-assisted: yes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7257446331 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1060#issuecomment-7257446331). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T14:37:21Z. --- Merged at head b2a7dab. Tested on this head by OreoFR, zmasi: the new test fails on main and passes with the PR (results in the comments above). AI-assisted: yes.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!1060
No description provided.