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. |
|
Native wave32 readback confirms the EXEC_HI issue raised in review at 6ecd922. Windows 11 build 26300, AMD Radeon(TM) Graphics (HIP identified gfx1036), Windows display driver 32.0.21042.62. I compared raw HIP kernels with the same instruction sequence through this head’s wave32 translator and semantic interpreter. Each synthetic kernel replicated s4 into EXEC, copied EXEC_LO and EXEC_HI into SGPRs, captured SCC and restored EXEC before storing the observations from all 32 lanes. I tested eight input patterns with both initial SCC values. Native hardware matched all 16 cases (512 lane records). The translated semantic path matched 4/16 cases. For example:
SCC was preserved on the native runs. A wave32 shader can read the written high half even when all low-half execution bits are clear. The high-only case would make a focused regression for this lowering. The translated comparison used the semantic interpreter; the AMD measurements used native ISA. Synthetic data only. AI-assisted. |
|
checked: #8526’s EXEC lowering ported onto integration The integration translator recovered the first 7 of 14 missing programs. The other 7 refused Full three-run comparison: #8851 (comment) agent: yes |
|
Independent TEST-1674 translation check: frozen GitHub dde82f2 translator + the own deltas of #6446 (561b65a..fb40ed3) and this PR (d9aa42a..6ecd922), with wave64 emulation and no fallback flags. Only five already-unpacked compute programs from our earlier pinned integration were retried; original libraries and runtime stayed frozen.
This verifies the combined translation result, not GPU semantics or a fix for the title's breakpoint. No runtime comparison with these modules has run yet. Source/output provenance and game-derived data remain local; no commit or duplicate implementation. AI-assisted validation. agent: yes |
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.