Repository navigation
Conversation
A 32-bit scalar source provides each lane's bit at L / 2. Use the existing EXEC state for the destination and keep SCC. Check all 64 lane results, including the high source bit, with a synthetic compute program.
|
Independent RTX 4070 SUPER GPU verification of |
gut0to
left a comment
There was a problem hiding this comment.
Reviewed the EXEC lowering and the updated translator contract. The per-lane source bit is lane // 2; the synthetic wave64 regression checks zero, high-bit, sparse and full masks across all 64 lanes and verifies SCC is unchanged. Ran python -m unittest discover -s tests/semantic -p test_salu_b32_lane_masks.py: 9 tests passed, 1 skipped. I did not independently run the new destination case on a physical GPU.
tupacfan04
left a comment
There was a problem hiding this comment.
The wave64 lowering is correct (shift = lane >> 1, bit = (word >> shift) & 1, set_exec; SCC preserved; tests 0, 0x80000001, 0x0f0f0f0f, M32 all pass). Wave32 loses the high EXEC half.
tools/rdna2spirv.py:6841-6848 emits the per-lane bit and set_exec(bit); set_exec (:1523-1525) only stores this invocation's active bit. s_bitreplicate_b64_b32 exec, s4 writes a 64-bit destination: EXEC bits 0..31 from s4[0..15], bits 32..63 from s4[16..31]. In a wave32 program wave_lane() is only 0..31, so no invocation writes the high dword; s4[16..31] is discarded. A later s_mov_b32 sX, exec_hi/64-bit EXEC read sees the stale high half; src_u even returns the current active bit for exec_hi (:469-470), so the high dword is not representable.
The new test is wave64-only (tests/semantic/test_salu_b32_lane_masks.py:214,217 use translate_cs(...,64)/run_cs(...,64)); it has no wave32 case, no exec_hi read and no WAVE64_EMULATE run.
Fix: reject s_bitreplicate_b64_b32 exec when not self.wave64 (Unsupported), or model the high dword and update src_u/the data path. Add a wave32 test with source bits 16..31 and a read of exec_hi/the full EXEC (s_mov_b32 sX, exec_hi, s_bcnt1_i32_b64 exec, s_mov_b64 s[..], exec), plus an emulate=True run and a partial/zero-EXEC start. Synthetic only; no game files. AI-assisted (OpenCode).
|
Tested
|
|
Independent verification of exact head Linux x86-64, NVIDIA GeForce RTX 3090, driver 615.78.08, measured Vulkan subgroup range 32..32. Fresh native
Renderer/menu behavior remains unverified by this check. No retail-rendering result is claimed and no game data or identifiers are included. AI-assisted (Codex). |
|
macOS arm64 verification (Apple M3 Pro) — and a merge conflict to resolve before landing Tested the PR head merged onto The conflict is trivial but worth doing deliberately: main has since reworded the neighbouring Host: macOS 27.2.1, Apple M3 Pro (arm64), CPython 3.15.2.
That is +1 test over the baseline and no new failures. The two ( Negative control: Review of the lowering For lane L the op sets
Also correct, and covered: SCC is left untouched (the test reads it back through Nit: No functional issues found in the code. No game files. AI-assisted. |
|
Independent CPU-side check of
This covers the translator and its interpreter only; I did not run it on a device. AI-assisted. |
Coordination claim
What changed
A scalar s_bitreplicate_b64_b32 may write EXEC. The result's bit for lane L comes from scalar source bit L / 2. Lower it directly through the per-lane EXEC state and preserve SCC. This uses the scalar instruction semantics measured in #7082.
Verification
Source and synthetic tests only. AI-assisted with Codex.