Files
mandy/tests
DiazE117 2fde230ea2 tests: run wave64 cross-half lane ops across 64 lanes of the translated SPIR-V
spirv_mini_interp gains run_workgroup: invocations run in lockstep and meet at
OpGroupNonUniformShuffle (Subgroup scope), with an explicit subgroup size. A
shuffle from a lane outside the subgroup raises UndefinedResult, or wraps
mod the subgroup size on request (the issue #94 symptom, a model and not the
spec). A shift by at least the bit width is now an undefined value that only
raises when used: v_mbcnt computes 1 << lane for lanes >= 32 and selects it
away, which is valid SPIR-V.

test_wave64_cross_half translates cs_w64x_readlane, cs_w64x_writelane and
cs_w64x_bpermute (no --wave64-emulate):
- one 64-wide subgroup: all 24 words equal check.py's GPU values;
- two 32-wide subgroups: bpermute and the writelane writes stay exact, a
  cross-half readlane is undefined; the wrap model gives the words a 32-wide
  GPU without emulation is predicted to show;
- SPIR-V sabotages (readlane lane & 31, bpermute without its half base) must
  change the 64-wide result.

CPU only (Windows 11, Python 3.11.9): 382 semantic tests pass. Not yet
measured on a GPU. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 16:51:03 -06:00
..