M1: reproduce GPU wave32/wave64 semantic differences across vendors #4
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ProhorovIlja--NativeX-Runtime#4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@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_bpermutezero-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.@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.