lane_masks, rdna2spirv: wrap parked v_writelane/v_readlane slots mod 32 in wave32 (LANE-MASKS-WAVE32-SLOT) #1803

Merged
ShotTechOp merged 1 commit from upstream-pr/1803 into main 2026-11-29 00:14:28 +00:00
ShotTechOp commented 2026-11-25 12:19:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ShotTechOp on 2026-11-25T12:19:24Z.


Summary

Claimed in #1608 as LANE-MASKS-WAVE32-SLOT: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7162135689

In wave32 (wave64=False), RDNA2 v_writelane_b32 and v_readlane_b32 mask the lane selector by S1[4:0] (& 31, mod 32) — which tools/rdna2spirv.py already emits at lines 8818 and 8837 (self.cu(63 if self.wave64 else 31)). However, lane_masks.lane_slot() always masked by & 63 and lane_masks.parked() / rdna2spirv.py did not pass wave64:

  • Overwriting lane 32 (32 & 31 == 0) with plain data in wave32 failed to invalidate a mask parked in lane 0, so a subsequent v_readlane_b32 returned the stale parked mask ([0xffffffff, 0xffffffff, 0, 0]) instead of the written scalar ([0x55aa] * 4).
  • Parking a mask in lane 32 in wave32 and reading it back from lane 0 missed the parked slot and broadcast lane 0's bit across all lanes instead of restoring each lane's bit.

Changes

  • tools/lane_masks.py:
    • lane_slot(vgpr, lane, wave64=True): mask lane index by 63 if wave64 else 31, and reject multi-dword VGPRs (n != 1) or abs/neg-modified operands.
    • step() and parked(blocks, masks, wave64=True): thread wave64 into lane_slot() (default True preserves existing callers).
  • tools/rdna2spirv.py:
    • Pass wave64=self.wave64 to lane_masks.parked() (park_masks) and lane_masks.lane_slot() (v_readlane_b32 / v_writelane_b32).
  • tests/test_lane_masks.py & tests/semantic/test_lane_masks_edge_cases.py:
    • Unit tests for wave32 mod-32 aliasing, wave64 lane-0 vs lane-32 separation, and multi-dword/modified operand rejection.
    • End-to-end translated wave32 compute shader tests executed through spirv_mini_interp.run_workgroup.

Testing

Environment: Windows 11 x64, Python 3.12.10, CPU-only (no GPU or game files; based on 0d80bc5).

  • Negative control on unpatched main (0d80bc5):
    • python -I tests/test_lane_masks.py -> AssertionError in test_wave32_parked_lane_wraps_mod_32
    • python -m unittest discover -s tests/semantic -p test_lane_masks_edge_cases.py -> FAIL ([0xffffffff, 0xffffffff, 0, 0] != [0x55aa] * 4)
  • After fix:
    • python -I tests/test_lane_masks.py -> ok
    • python -m unittest discover -s tests/semantic -p "test_*lane_mask*.py" -> all OK
    • python -m compileall -q / scripts/check_no_game_data.py / git diff --check -> all clean

AI-assisted: yes (Antigravity). Synthetic inputs only; no game data.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5491193374 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1803). Originally posted by [ShotTechOp](https://github.com/ShotTechOp) on 2026-11-25T12:19:24Z. --- ## Summary Claimed in #1608 as `LANE-MASKS-WAVE32-SLOT`: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7162135689 In wave32 (`wave64=False`), RDNA2 `v_writelane_b32` and `v_readlane_b32` mask the lane selector by `S1[4:0]` (`& 31`, mod 32) — which `tools/rdna2spirv.py` already emits at lines 8818 and 8837 (`self.cu(63 if self.wave64 else 31)`). However, `lane_masks.lane_slot()` always masked by `& 63` and `lane_masks.parked()` / `rdna2spirv.py` did not pass `wave64`: - Overwriting lane `32` (`32 & 31 == 0`) with plain data in wave32 failed to invalidate a mask parked in lane `0`, so a subsequent `v_readlane_b32` returned the stale parked mask (`[0xffffffff, 0xffffffff, 0, 0]`) instead of the written scalar (`[0x55aa] * 4`). - Parking a mask in lane `32` in wave32 and reading it back from lane `0` missed the parked slot and broadcast lane 0's bit across all lanes instead of restoring each lane's bit. ### Changes - `tools/lane_masks.py`: - `lane_slot(vgpr, lane, wave64=True)`: mask lane index by `63 if wave64 else 31`, and reject multi-dword VGPRs (`n != 1`) or `abs`/`neg`-modified operands. - `step()` and `parked(blocks, masks, wave64=True)`: thread `wave64` into `lane_slot()` (default `True` preserves existing callers). - `tools/rdna2spirv.py`: - Pass `wave64=self.wave64` to `lane_masks.parked()` (`park_masks`) and `lane_masks.lane_slot()` (`v_readlane_b32` / `v_writelane_b32`). - `tests/test_lane_masks.py` & `tests/semantic/test_lane_masks_edge_cases.py`: - Unit tests for wave32 mod-32 aliasing, wave64 lane-0 vs lane-32 separation, and multi-dword/modified operand rejection. - End-to-end translated wave32 compute shader tests executed through `spirv_mini_interp.run_workgroup`. ## Testing Environment: Windows 11 x64, Python 3.12.10, CPU-only (no GPU or game files; based on `0d80bc5`). - Negative control on unpatched `main` (`0d80bc5`): - `python -I tests/test_lane_masks.py` -> `AssertionError` in `test_wave32_parked_lane_wraps_mod_32` - `python -m unittest discover -s tests/semantic -p test_lane_masks_edge_cases.py` -> `FAIL` (`[0xffffffff, 0xffffffff, 0, 0]` != `[0x55aa] * 4`) - After fix: - `python -I tests/test_lane_masks.py` -> `ok` - `python -m unittest discover -s tests/semantic -p "test_*lane_mask*.py"` -> all OK - `python -m compileall -q` / `scripts/check_no_game_data.py` / `git diff --check` -> all clean AI-assisted: yes (Antigravity). Synthetic inputs only; no game data.
GeorgiyDemo commented 2026-11-25 12:20:06 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by GeorgiyDemo on 2026-11-25T12:20:06Z.


Tested 87fde5c8d on Apple M5 Pro (16-core GPU), macOS 26.7.3 (25G342), against main 0d80bc5df (translator/bookkeeping PR; binaries from the build at 66d4f5aa3):

  • python3 -I tests/test_lane_masks.py: ok at this head; on main it fails with an AssertionError in the parked-slot-32 case.
  • tests/semantic/test_lane_masks_edge_cases.py (from tests/semantic): OK at this head; on main 1 failure.
  • GPU smoke, --filter cs_w32_mask on MoltenVK 1.4.2: 1/1 PASS (cs_w32_mask_imm 2056 20 2 6152 2050 4112 258 32).
  • Not run: the full mask suite; the PR adds no fixture — the lane-mask parking is translator bookkeeping.

AI-assisted; synthetic fixtures only, no game data.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7162233612 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1803#issuecomment-7162233612). Originally posted by [GeorgiyDemo](https://github.com/GeorgiyDemo) on 2026-11-25T12:20:06Z. --- Tested `87fde5c8d` on Apple M5 Pro (16-core GPU), macOS 26.7.3 (25G342), against `main` `0d80bc5df` (translator/bookkeeping PR; binaries from the build at `66d4f5aa3`): - `python3 -I tests/test_lane_masks.py`: **ok** at this head; on `main` it fails with an `AssertionError` in the parked-slot-32 case. - `tests/semantic/test_lane_masks_edge_cases.py` (from `tests/semantic`): **OK** at this head; on `main` **1 failure**. - GPU smoke, `--filter cs_w32_mask` on **MoltenVK 1.4.2**: **1/1 PASS** (`cs_w32_mask_imm` `2056 20 2 6152 2050 4112 258 32`). - Not run: the full mask suite; the PR adds no fixture — the lane-mask parking is translator bookkeeping. AI-assisted; synthetic fixtures only, no game data.
EvgHaze commented 2026-11-25 12:58:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by EvgHaze on 2026-11-25T12:58:50Z.


Apple check — no change on the GPU words, and one gap worth naming.

Machine:  Apple M3, 10-core (MacBook Air 13", Mac15,13), macOS 27.0 (26A5406e), arm64
Drivers:  MoltenVK 1.4.2 (Homebrew), ICD loaded directly, subgroup 4..32
          KosmicKrisp, Mesa 26.3.1 (Homebrew), through the Vulkan loader, subgroup 32..32
Base:     main `0d80bc5` + this diff (clean `git apply`)

scripts/run_gpu_tests.py --filter lane, identical on both drivers and on main:

Test Result
cs_w32_lane_wrap PASS 25 16 777 777
cs_w32_permlane_fi PASS 1000 0 4 1 1000 0 52 49
cs_w64x_readfirstlane, cs_w64x_readlane, cs_w64x_writelane SKIP (no 64-wide compute subgroup)
ps_w64x_readlane SKIP (cannot require a 64-wide fragment subgroup, 4..32)

2/6 passed, 4 skipped — before and after the diff, same words.

Semantic suite: main is 489 files, 6288 tests, 0 failed; with this diff 489 files, 6289 tests, 0 failed — the one extra test being this PR's.

The gap: cs_w32_lane32_overwrite and cs_w32_lane32_restore are built inside tests/semantic/test_lane_masks_edge_cases.py and never reach the GPU registry, so the wave32 slot wrap has no hardware fixture. A 32-wide host is exactly where those two programs run natively instead of being split, so if a GPU fixture ever gets added here, an Apple run is the one that would exercise it without emulation.

AI-assisted. No game data: hand-written programs, and the numbers above are test output.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7163121151 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1803#issuecomment-7163121151). Originally posted by [EvgHaze](https://github.com/EvgHaze) on 2026-11-25T12:58:50Z. --- Apple check — no change on the GPU words, and one gap worth naming. ```text Machine: Apple M3, 10-core (MacBook Air 13", Mac15,13), macOS 27.0 (26A5406e), arm64 Drivers: MoltenVK 1.4.2 (Homebrew), ICD loaded directly, subgroup 4..32 KosmicKrisp, Mesa 26.3.1 (Homebrew), through the Vulkan loader, subgroup 32..32 Base: main `0d80bc5` + this diff (clean `git apply`) ``` `scripts/run_gpu_tests.py --filter lane`, identical on both drivers and on main: | Test | Result | |---|---| | `cs_w32_lane_wrap` | PASS `25 16 777 777` | | `cs_w32_permlane_fi` | PASS `1000 0 4 1 1000 0 52 49` | | `cs_w64x_readfirstlane`, `cs_w64x_readlane`, `cs_w64x_writelane` | SKIP (no 64-wide compute subgroup) | | `ps_w64x_readlane` | SKIP (cannot require a 64-wide fragment subgroup, 4..32) | 2/6 passed, 4 skipped — before and after the diff, same words. Semantic suite: main is `489 files, 6288 tests, 0 failed`; with this diff `489 files, 6289 tests, 0 failed` — the one extra test being this PR's. **The gap:** `cs_w32_lane32_overwrite` and `cs_w32_lane32_restore` are built inside `tests/semantic/test_lane_masks_edge_cases.py` and never reach the GPU registry, so the wave32 slot wrap has no hardware fixture. A 32-wide host is exactly where those two programs run natively instead of being split, so if a GPU fixture ever gets added here, an Apple run is the one that would exercise it without emulation. AI-assisted. No game data: hand-written programs, and the numbers above are test output.
potatoe0100 commented 2026-11-25 13:50:37 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by potatoe0100 on 2026-11-25T13:50:37Z.


Tested 87fde5c8d merged onto main 98c2f7777 (clean), native Windows 11 Pro 26H2 (build 26300), NVIDIA GeForce RTX 4060, driver 621.14, VS 2022 (MSVC 19.44) RelWithDebInfo + Ninja, llvm-mc 21.1.8.

  • run_gpu_tests.py: 209/263 passed, 53 skipped, identical to main, so the wave32 slot wrap changes no fixture result on this 32-wide GPU.
  • Full ctest -j 6: 439 of 439 passed.

AI-assisted (Claude)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7164371096 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1803#issuecomment-7164371096). Originally posted by [potatoe0100](https://github.com/potatoe0100) on 2026-11-25T13:50:37Z. --- Tested `87fde5c8d` merged onto `main` `98c2f7777` (clean), native Windows 11 Pro 26H2 (build 26300), NVIDIA GeForce RTX 4060, driver 621.14, VS 2022 (MSVC 19.44) RelWithDebInfo + Ninja, llvm-mc 21.1.8. - `run_gpu_tests.py`: 209/263 passed, 53 skipped, identical to `main`, so the wave32 slot wrap changes no fixture result on this 32-wide GPU. - Full `ctest -j 6`: 439 of 439 passed. AI-assisted (Claude)
tyr0nsur commented 2026-11-25 14:57:40 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by tyr0nsur on 2026-11-25T14:57:40Z.


Hardware readback for the two parked-mask patterns in this PR, including slots close to the row and wave boundaries. On a desktop RTX 4060, Windows 11 Pro build 26300, NVIDIA 32.0.16.2114, the Vulkan harness reported a fixed 32-lane subgroup.

Translator GPU dispatches Matching lane words
Parent 0d80bc5df7c8 12 98/384
PR 87fde5c8dacc 12 384/384

I kept the same native vk_compute_test executable from the PR for both runs and changed the translator checkout. Each program used a 32×1×1 group. I tested 0↔32, 1↔33 and 31↔63 in both directions, both overwriting a parked mask with 0x55aa and restoring a compare mask for lanes 0–16. I checked all 32 output words each time. On the parent, every overwrite case failed all 32 words. On the PR, both operations matched throughout.

The standalone probe uses your translator, Python SPIR-V assembler and native Vulkan readback. Run python probes/leonida_lane_slots.py <leonida-checkout> <path-to-vk_compute_test> against each checkout. All inputs are hand-written. AI assistance: OpenAI Codex (GPT-6) prepared and ran the probe.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7166084230 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1803#issuecomment-7166084230). Originally posted by [tyr0nsur](https://github.com/tyr0nsur) on 2026-11-25T14:57:40Z. --- Hardware readback for the two parked-mask patterns in this PR, including slots close to the row and wave boundaries. On a desktop RTX 4060, Windows 11 Pro build 26300, NVIDIA 32.0.16.2114, the Vulkan harness reported a fixed 32-lane subgroup. | Translator | GPU dispatches | Matching lane words | | --- | ---: | ---: | | Parent `0d80bc5df7c8` | 12 | 98/384 | | PR `87fde5c8dacc` | 12 | 384/384 | I kept the same native `vk_compute_test` executable from the PR for both runs and changed the translator checkout. Each program used a 32×1×1 group. I tested 0↔32, 1↔33 and 31↔63 in both directions, both overwriting a parked mask with `0x55aa` and restoring a compare mask for lanes 0–16. I checked all 32 output words each time. On the parent, every overwrite case failed all 32 words. On the PR, both operations matched throughout. The [standalone probe](https://github.com/tyr0nsur/PortVI/blob/6578eff095f9cc01a948efd3ce44c15e406922a5/probes/leonida_lane_slots.py) uses your translator, Python SPIR-V assembler and native Vulkan readback. Run `python probes/leonida_lane_slots.py <leonida-checkout> <path-to-vk_compute_test>` against each checkout. All inputs are hand-written. AI assistance: OpenAI Codex (GPT-6) prepared and ran the probe.
kirigayakazima commented 2026-11-28 03:51:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kirigayakazima on 2026-11-28T03:51:38Z.


#1803 | head 87fde5c8da | python -I -m unittest discover -s tests/semantic -p test_lane_masks_edge_cases.py & python -I tests/test_lane_masks.py | red: test_lane_masks_edge_cases Ran 8 tests - FAILED (failures=1); test_lane_masks AssertionError in test_wave32_parked_lane_wraps_mod_32 | green: test_lane_masks_edge_cases Ran 8 tests in 0.180s - OK; test_lane_masks ok | full suite: 505 files, 6398 tests, 0 files failed in 386 s (vs main 02f71ccfe7: 505 files, 6397 tests, 0 failed); stdlib 514/521 passed (0 new failures); compileall=0; node viewer_streaming=0 | Windows 11, Python 3.14.7, no game files | AI-assisted: yes, Antigravity (Gemini)

  • Clean merge onto main 02f71ccfe7; scripts/check_no_game_data.py passed (0).
  • Both test suites fail purely on assertions against clean main and pass completely once merged.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7233454699 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1803#issuecomment-7233454699). Originally posted by [kirigayakazima](https://github.com/kirigayakazima) on 2026-11-28T03:51:38Z. --- #1803 | head 87fde5c8daccdb29ef6d78d8877bae15cab5eabb | python -I -m unittest discover -s tests/semantic -p test_lane_masks_edge_cases.py & python -I tests/test_lane_masks.py | red: test_lane_masks_edge_cases Ran 8 tests - FAILED (failures=1); test_lane_masks AssertionError in test_wave32_parked_lane_wraps_mod_32 | green: test_lane_masks_edge_cases Ran 8 tests in 0.180s - OK; test_lane_masks ok | full suite: 505 files, 6398 tests, 0 files failed in 386 s (vs main 02f71ccfe7: 505 files, 6397 tests, 0 failed); stdlib 514/521 passed (0 new failures); compileall=0; node viewer_streaming=0 | Windows 11, Python 3.14.7, no game files | AI-assisted: yes, Antigravity (Gemini) - Clean merge onto `main` `02f71ccfe7`; `scripts/check_no_game_data.py` passed (`0`). - Both test suites fail purely on assertions against clean `main` and pass completely once merged.
timbot103 commented 2026-11-28 13:23:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-28T13:23:09Z.

Review: APPROVED


Independently verified 87fde5c8d merged cleanly onto main (d48a957bb) on Windows 11 across two Vulkan GPUs (zero game files):

  • NVIDIA GeForce RTX 5080 (driver 32.0.16.1664, LEONIDA_W64_EMULATE=1)
  • AMD Radeon(TM) Graphics (gfx1036) (driver 32.0.21030.2001, LEONIDA_W64_EMULATE=0)

Red on main (d48a957bb) control:

  • pytest tests/test_lane_masks.py: 1 failed, 10 passed (test_wave32_parked_lane_wraps_mod_32).
  • scripts/run_semantic_tests.py tests/semantic -p test_lane_masks_edge_cases.py: 1 failed, 7 passed (test_wave32_writelane_lane_32_aliases_lane_0_for_parked_masks).

Green on #1803 (87fde5c8d):

  • pytest tests/test_lane_masks.py: 11/11 passed.
  • scripts/run_semantic_tests.py tests/semantic -p test_lane_masks_edge_cases.py: 8/8 passed.
  • scripts/run_gpu_tests.py --filter cs_w64 --require-pass: 24/24 passed (25/25 translated & spirv-val clean, including cs_w64x_readlane, cs_w64x_writelane, cs_w64x_readfirstlane) on both RTX 5080 and AMD Radeon gfx1036.

LGTM.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6098008695 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1803#pullrequestreview-6098008695). Originally posted by [timbot103](https://github.com/timbot103) on 2026-11-28T13:23:09Z. **Review:** APPROVED --- Independently verified `87fde5c8d` merged cleanly onto `main` (`d48a957bb`) on Windows 11 across two Vulkan GPUs (zero game files): - **NVIDIA GeForce RTX 5080** (driver `32.0.16.1664`, `LEONIDA_W64_EMULATE=1`) - **AMD Radeon(TM) Graphics (`gfx1036`)** (driver `32.0.21030.2001`, `LEONIDA_W64_EMULATE=0`) **Red on `main` (`d48a957bb`) control:** - `pytest tests/test_lane_masks.py`: **1 failed, 10 passed** (`test_wave32_parked_lane_wraps_mod_32`). - `scripts/run_semantic_tests.py tests/semantic -p test_lane_masks_edge_cases.py`: **1 failed, 7 passed** (`test_wave32_writelane_lane_32_aliases_lane_0_for_parked_masks`). **Green on `#1803` (`87fde5c8d`):** - `pytest tests/test_lane_masks.py`: **11/11 passed**. - `scripts/run_semantic_tests.py tests/semantic -p test_lane_masks_edge_cases.py`: **8/8 passed**. - `scripts/run_gpu_tests.py --filter cs_w64 --require-pass`: **24/24 passed** (`25/25` translated & `spirv-val` clean, including `cs_w64x_readlane`, `cs_w64x_writelane`, `cs_w64x_readfirstlane`) on **both RTX 5080 and AMD Radeon `gfx1036`**. LGTM.
zmasi commented 2026-11-28 23:46:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T23:46:41Z.


Native Windows 11 + NVIDIA GeForce RTX 3090 Verification (PASS)

Verified commit 87fde5c8da merged onto main (a9e247cd69) on Windows 11 (10.0.26200, Python 3.12.10) with physical NVIDIA GeForce RTX 3090 (driver 610.88, native 32-lane subgroup 32..32, Vulkan 1.4 + VK_LAYER_KHRONOS_validation 1.4.363.1):

  • Red (main + PR tests):
    • python -I tests/test_lane_masks.py -> AssertionError in test_wave32_parked_lane_wraps_mod_32 (writing plain data via v_writelane_b32 v5, s9, 32 failed to invalidate parked mask slot ("lane", 5, 0) in wave32).
    • python -I -m unittest discover -s tests/semantic -p test_lane_masks_edge_cases.py -v -> FAILED (failures=1) ([0xFFFFFFFF, 0xFFFFFFFF, 0, 0] != [0x55AA, 0x55AA, 0x55AA, 0x55AA]).
  • Green (87fde5c8da + main):
    • python -I tests/test_lane_masks.py -> ok.
    • python -I -m unittest discover -s tests/semantic -p test_lane_masks_edge_cases.py -v -> 8/8 OK (0.219s).
    • Live 32-lane RTX 3090 GPU dispatch probe (vk_compute_test with LEONIDA_VK_VALIDATION=1 on both wave32 shaders translated & validated with spirv-as / spirv-val):
      • cs_w32_overwrite (v_writelane_b32 v5, mask, 0 overwritten by v_writelane_b32 v5, 0x55aa, 32 -> v_readlane_b32 s14, v5, 0): rc=0, out[0..7] = 0x55AA across all lanes (0 mismatches, 0 validation errors).
      • cs_w32_restore (v_cmp_lt_u32_e64 s12, v0, 2 parked via v_writelane_b32 v5, s12, 32 -> v_readlane_b32 s14, v5, 0 -> v_cndmask_b32_e64 v2, 10, 20, s14): rc=0, out[0..7] = [20, 20, 10, 10, 10, 10, 10, 10] (0 mismatches, 0 validation errors).
    • python -I scripts/check_no_game_data.py clean (0 issues).

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7247656863 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1803#issuecomment-7247656863). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T23:46:41Z. --- ## Native Windows 11 + NVIDIA GeForce RTX 3090 Verification (`PASS`) Verified commit `87fde5c8da` merged onto `main` (`a9e247cd69`) on Windows 11 (`10.0.26200`, Python `3.12.10`) with physical **NVIDIA GeForce RTX 3090** (driver `610.88`, native 32-lane subgroup `32..32`, Vulkan `1.4` + `VK_LAYER_KHRONOS_validation` `1.4.363.1`): - **Red (`main` + PR tests)**: - `python -I tests/test_lane_masks.py` -> **`AssertionError`** in `test_wave32_parked_lane_wraps_mod_32` (writing plain data via `v_writelane_b32 v5, s9, 32` failed to invalidate parked mask slot `("lane", 5, 0)` in wave32). - `python -I -m unittest discover -s tests/semantic -p test_lane_masks_edge_cases.py -v` -> **`FAILED (failures=1)`** (`[0xFFFFFFFF, 0xFFFFFFFF, 0, 0] != [0x55AA, 0x55AA, 0x55AA, 0x55AA]`). - **Green (`87fde5c8da` + `main`)**: - `python -I tests/test_lane_masks.py` -> **`ok`**. - `python -I -m unittest discover -s tests/semantic -p test_lane_masks_edge_cases.py -v` -> **`8/8` `OK`** (`0.219s`). - **Live 32-lane RTX 3090 GPU dispatch probe** (`vk_compute_test` with `LEONIDA_VK_VALIDATION=1` on both wave32 shaders translated & validated with `spirv-as` / `spirv-val`): - `cs_w32_overwrite` (`v_writelane_b32 v5, mask, 0` overwritten by `v_writelane_b32 v5, 0x55aa, 32` -> `v_readlane_b32 s14, v5, 0`): `rc=0`, `out[0..7] = 0x55AA` across all lanes (`0` mismatches, `0` validation errors). - `cs_w32_restore` (`v_cmp_lt_u32_e64 s12, v0, 2` parked via `v_writelane_b32 v5, s12, 32` -> `v_readlane_b32 s14, v5, 0` -> `v_cndmask_b32_e64 v2, 10, 20, s14`): `rc=0`, `out[0..7] = [20, 20, 10, 10, 10, 10, 10, 10]` (`0` mismatches, `0` validation errors). - `python -I scripts/check_no_game_data.py` clean (`0` issues). AI-assisted.
TheGeogeo commented 2026-11-29 00:00:39 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T00:00:39Z.


Tested 87fde5c8d merged (no commit) with main aa918e5d9. Python 3.12.4, Windows 11 10.0.26300, CPU only, with LLVM_MC (conda-forge llvm-tools) and SPIRV-Tools from the Vulkan SDK 1.4.363.1. check_no_game_data.py is clean.

  • Green: tests/semantic/test_lane_masks_edge_cases.py (8 tests) and tests/test_lane_masks.py pass.
  • Red: with tools/lane_masks.py and tools/rdna2spirv.py back to main, both fail: the edge-case file with [4294967295, 4294967295, 0, 0] != [21930, 21930, 21930, 21930], and test_lane_masks.py with an AssertionError in test_wave32_parked_lane_wraps_mod_32.

Overlap check across #1973, #1977, #1990, #1943, #1994, #1996 and #1803 (same translator area):

  • None is a stack or a duplicate. They are independent single commits, and each covers a different reader:
    • plain 64-bit VCC data: #1973 for the b64 bit ops, #1977 for s_wqm, #1990 for src64_data/is_mask_op;
    • per-lane bits from non-mask sources: #1943 for VCC data, #1994 for s_mov into exec_hi, #1996 for m0/scc;
    • #1803: wave32 lane slots.
  • The only textual conflict is docs/design.md, between #1990, #1943 and #1994.
  • With all 7 merged together on main (docs/design.md taken from main), each PR's own test file passes. The full semantic suite (scripts/run_semantic_tests.py tests/semantic -j 4, 528 files, 6513 tests) fails in 2 files:
    • test_valu_cvt_f16_int16_mods, which fails on plain main too;
    • test_wave64_emulate_opt, which comes from #1990 alone (see #1990).

No blocker from my side.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7247809811 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1803#issuecomment-7247809811). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-29T00:00:39Z. --- Tested `87fde5c8d` merged (no commit) with `main` `aa918e5d9`. Python 3.12.4, Windows 11 10.0.26300, CPU only, with `LLVM_MC` (conda-forge llvm-tools) and SPIRV-Tools from the Vulkan SDK 1.4.363.1. `check_no_game_data.py` is clean. - Green: `tests/semantic/test_lane_masks_edge_cases.py` (8 tests) and `tests/test_lane_masks.py` pass. - Red: with `tools/lane_masks.py` and `tools/rdna2spirv.py` back to `main`, both fail: the edge-case file with `[4294967295, 4294967295, 0, 0] != [21930, 21930, 21930, 21930]`, and `test_lane_masks.py` with an `AssertionError` in `test_wave32_parked_lane_wraps_mod_32`. Overlap check across #1973, #1977, #1990, #1943, #1994, #1996 and #1803 (same translator area): - None is a stack or a duplicate. They are independent single commits, and each covers a different reader: - plain 64-bit VCC data: #1973 for the b64 bit ops, #1977 for `s_wqm`, #1990 for `src64_data`/`is_mask_op`; - per-lane bits from non-mask sources: #1943 for VCC data, #1994 for `s_mov` into `exec_hi`, #1996 for `m0`/`scc`; - #1803: wave32 lane slots. - The only textual conflict is `docs/design.md`, between #1990, #1943 and #1994. - With all 7 merged together on `main` (`docs/design.md` taken from `main`), each PR's own test file passes. The full semantic suite (`scripts/run_semantic_tests.py tests/semantic -j 4`, 528 files, 6513 tests) fails in 2 files: - `test_valu_cvt_f16_int16_mods`, which fails on plain `main` too; - `test_wave64_emulate_opt`, which comes from #1990 alone (see #1990). No blocker from my side. AI-assisted (Claude Code).
MoonEyes commented 2026-11-29 00:14:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-29T00:14:31Z.


Merged after TheGeogeo's red/green check (check) (Windows, Python tests, no GPU needed) and a local re-check here. Merged after local re-verification: this PR merged onto main 1cb5df073 without conflict, and its test file(s) (tests/semantic/test_lane_masks_edge_cases.py, tests/test_lane_masks.py) pass there. Earlier today the same tests failed on main without the PR (red/green) and a bundle with other open PRs showed no new failures. check_no_game_data.py is clean. Windows 11, Python 3.14; no GPU needed for these tests.

AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7247975053 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1803#issuecomment-7247975053). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-29T00:14:31Z. --- Merged after **TheGeogeo**'s red/green check ([check](https://github.com/ProjectLeonida/mandy/pull/1803#issuecomment-7247809811)) (Windows, Python tests, no GPU needed) and a local re-check here. Merged after local re-verification: this PR merged onto `main` 1cb5df073 without conflict, and its test file(s) (`tests/semantic/test_lane_masks_edge_cases.py`, `tests/test_lane_masks.py`) pass there. Earlier today the same tests failed on `main` without the PR (red/green) and a bundle with other open PRs showed no new failures. `check_no_game_data.py` is clean. Windows 11, Python 3.14; no GPU needed for these tests. _AI-assisted (Claude Code, Claude Opus 5.5), merged for MoonEyes._
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!1803
No description provided.