M1: reproduce GPU wave32/wave64 semantic differences across vendors #4

Open
opened 2026-11-26 21:00:22 +00:00 by github-bot · 1 comment
Owner

@⁠ProhorovIlja on GitHub · 2026-11-21 21:13 UTC · original

Important known correctness risks:

Create original source-built synthetic shaders only. Compare CPU reference with WARP/Desktop D3D12 and Vulkan where possible; record lane width, wave mask, inactive-lane behavior, LDS, barriers and cross-half exchanges.

Acceptance: compilation and SPIR-V validation measured separately from output correctness and reproducible hardware results. No proprietary shader dumps.

2026-11-22 progress: CPU reference

PR #8 merged after Linux and Windows tests passed. Deterministic original C++17 CPU-only wave64 oracle vs two wave32 partials covers lane31/32, masks, cross-half reads, inclusive prefixes, totals and a negative control proving a naive wave32 implementation wrong. Not GPU execution. Leonida PR #204 additionally reports a distinct AMD native wave64 ds_bpermute zero-fallback rule for unlaunched lanes, still a pending author-supplied result. Next: original shader source-based WARP/DXIL or Vulkan real GPU differential tests with correct lane undefined semantics.

**@⁠ProhorovIlja** on GitHub · 2026-11-21 21:13 UTC · [original](https://github.com/ProhorovIlja/NativeX-Runtime/issues/4) Important known correctness risks: - https://github.com/ItsNotRexed/Leonida/issues/94: 32-lane subgroup and 64-lane operations on NVIDIA - https://github.com/R0Y00/Xbox2Windows/issues/145: WARP non-uniform wave64 shuffle observation - https://github.com/LooperSalty/AnyXboxX/blob/main/docs/recherche/tombox-decodeur.md: comparison against LLVM gfx10/gfx1030 opcode fixtures Create **original source-built synthetic shaders only**. Compare CPU reference with WARP/Desktop D3D12 and Vulkan where possible; record lane width, wave mask, inactive-lane behavior, LDS, barriers and cross-half exchanges. Acceptance: compilation and SPIR-V validation measured separately from output correctness and reproducible hardware results. No proprietary shader dumps. ## 2026-11-22 progress: CPU reference [PR #8](https://github.com/ProhorovIlja/Scarlett-Windows-Compat/pull/8) merged after Linux and Windows tests passed. Deterministic original C++17 CPU-only wave64 oracle vs two wave32 partials covers lane31/32, masks, cross-half reads, inclusive prefixes, totals and a negative control proving a naive wave32 implementation wrong. **Not GPU execution.** [Leonida PR #204](https://github.com/ItsNotRexed/Leonida/pull/204) additionally reports a distinct AMD native wave64 `ds_bpermute` zero-fallback rule for unlaunched lanes, still a pending author-supplied result. Next: original shader source-based WARP/DXIL or Vulkan real GPU differential tests with correct lane undefined semantics.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:00:22 +00:00
Author
Owner

@⁠Yoshi-233 on GitHub · 2026-11-25 02:45 UTC · original

I added a runnable Linux Vulkan check for the lane 31/32 boundary in #117. I ran the same shader on an NVIDIA device reporting subgroup size 32 and on llvmpipe reporting size 8. Each matched the CPU reference for all 1,622,016 output words. Flipping one expected bit made the test fail at the intended lane and field.

The fixture constructs a logical wave of 64 with workgroup memory and barriers. Native subgroup shuffles and a hardware wave64 comparison are still open. The PR includes the build and CTest commands.

**@⁠Yoshi-233** on GitHub · 2026-11-25 02:45 UTC · [original](https://github.com/ProhorovIlja/NativeX-Runtime/issues/4#issuecomment-7151149198) I added a runnable Linux Vulkan check for the lane 31/32 boundary in #117. I ran the same shader on an NVIDIA device reporting subgroup size 32 and on llvmpipe reporting size 8. Each matched the CPU reference for all 1,622,016 output words. Flipping one expected bit made the test fail at the intended lane and field. The fixture constructs a logical wave of 64 with workgroup memory and barriers. Native subgroup shuffles and a hardware wave64 comparison are still open. The PR includes the build and CTest commands.
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/ProhorovIlja--NativeX-Runtime#4
No description provided.