Repository navigation
docs: pin the v_add_nc_i16 and v_sub_nc_i16 row to measured gfx1100 words - #2844
Conversation
|
Reviewed and checked
Not reproduced here: native No game files. AI-assisted. |
|
Tested on Linux (WSL2 Ubuntu, Python 3.12.16) and native Windows 11 (Python 3.13.1), CPU only: pass. Docs-only (one row of docs/design.md), so no code tests apply; the referenced tests/semantic/test_valu_add_sub_nc_i16.py exists. The gfx1100 measurements cannot be reproduced here (no GPU). Merges cleanly with upstream/main, and trial merges with #2832, #2813, #2812, #2769, #2780, #2778 and #2822 (other open PRs editing docs/design.md) are conflict-free. |
8afda31 to
342a877
Compare
Kam471
left a comment
There was a problem hiding this comment.
Docs tests pass (design rows 2, links 5, list items 2, repo paths 2). The four edge rows plus the kept high half recompute, and llvm-mc gfx1100 accepts v_add_nc_i16/v_sub_nc_i16 with clamp. No in-repo gfx1100 oracle record; op_sel is explicitly not measured in the body. Approve.
Nit: “sum” covers the v_sub difference.
342a877 to
c5053f3
Compare
…ords The signed 16-bit add/sub row was still "Not GPU-verified". 24 raw kernels on an RX 7900 XTX show clamp saturating the exact sum of the sign-extended halves to [-32768, 32767] where the same pairs wrap without it, and the destination's high half kept in every case.
c5053f3 to
d78692b
Compare
|
Rebased onto |
Claimed in the coordination issue: claim (batch of three; this is the first to land).
What and why
The
v_add_nc_i16/v_sub_nc_i16row still ended "Not GPU-verified." onec8ec4c9. The row states two things nothing had checked on silicon:clampsaturates the exact sum of the sign-extended halves to [-32768, 32767], and the destination's other half is kept. Both are now measured.24 raw kernels on native
gfx1100(AMD Radeon RX 7900 XTX, Windows 11, driver 26.10.1) throughtools/hw_oracle. The destination is preset to0xAAAAAAAA, so a low-half-only write is visible as the other half surviving.clampclampv_add_nc_i16v_add_nc_i16v_sub_nc_i16v_sub_nc_i16Plus in-range pairs (
0x1234 + 1,0xFFFF + 0xFFFF) that agree with and withoutclamp. Every one of the 24 results keeps the destination's high half0xAAAA.The saturation is of the exact mathematical result, not of a wrapped 16-bit value:
−32768 + −1clamps to−32768and32767 − −1to32767, which is exactly what distinguishesSClampfrom the u16 forms'[0, 0xFFFF].Scope
Docs only, one row of
docs/design.md. Immediates only, no game files or keys.op_sel(which half each source reads and which half the destination writes) was not exercised here: the row already records it, andtests/semantic/test_valu_add_sub_nc_i16.pycovers the structure. What changed on the row is only its verification status.AI-assisted.