Repository navigation
docs/design.md: v_pack_b32_f16 abs is implemented, not refused - #5574
evilclanker9000 wants to merge 1 commit into
Conversation
|
Tested 07df005 on Windows 11. The revised description matches the translator. I used the source word I ran All six tests in AI-assisted. |
The 'input neg' row said abs is still refused and cited tests/test_values.py and tests/semantic/test_vop3_const_mods.py. tools/rdna2spirv.py:6278-6283 clears bit 15 for abs before the neg xor, and tests/semantic/test_pack_b32_f16_mods.py translates |v1|, -|v1| and op_sel halves and pins the bits. Say that, cite the tests, and point at the source-modifiers row for the RDNA2 measurement (issue ItsNotRexed#5517).
07df005 to
e755da4
Compare
Kam471
left a comment
There was a problem hiding this comment.
Reviewed head e755da4b5 (rebased onto current main 561b65a83; the earlier 07df005cb conflicted with the round-44 docs rewrite, this one is clean). Docs only; git diff --check clean (1 line).
Verified the new row against the code: v_pack_b32_f16 clears bit 15 for abs before the neg XOR. Tests: python -I -m pytest tests/test_values.py -q -> 59 passed; python tests/semantic/test_vop3_const_mods.py -> 11 tests OK; python tests/semantic/test_pack_b32_f16_mods.py -> 6 tests OK; ps_f16_pack_mods is in runtime/test/shaders/check.py:361.
Verdict: merge.
|
Verified against main 561b65a: the claim is accurate — the translator now implements abs for v_pack_b32_f16 as a bit-15 clear before neg (rdna2spirv.py:6977, measured on gfx1036 across 1,088 kernels per SHADER-260) while the row still says abs "is still refused … unmeasured", so the doc is genuinely stale. The conflict with current main is mechanical, not substantive: round-44 edited the adjacent "Packed 16-bit integer ops" row and git lands both edits in one hunk without an anchor line — keeping main's pk row plus your v_pack row resolves it, which is exactly what I did: all six docs guards pass, and test_pack_b32_f16_mods runs 6/6 with the named GPU fixture present. Checks pending. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
|
Tested e755da4 merged with main 561b65a on Linux (WSL2), Python 3.12.16: pass Docs-only (the Claim checked against main: tools/rdna2spirv.py Unrelated to this PR, noticed while reading: the next row on main, " Negative control: not applicable to a prose change. |
The
v_pack_b32_f16"inputneg" row of the translator contract table (docs/design.md:286) said the translator still refusesabson this instruction, and citedtests/test_values.pyandtests/semantic/test_vop3_const_mods.pyas its check.The code does the opposite:
tools/rdna2spirv.py:6278-6283clears bit 15 for anabsoperand before thenegxor of bit 15 (accepted in 1062df5, the follow-up of #1570), andtests/semantic/test_pack_b32_f16_mods.pytranslatesv_pack_b32_f16 v0, |v1|, v1,-|v1|and theop_sel:[1,0,0]high-half forms over the edge floats and pins the exact bits.tests/test_values.py:91-93has the matchingv_pack_b32_f16_abs_lo/_abs_snan/_neg_abscases.This rewrites that sentence to what the code and the tests do, cites the test that covers the rule, and points at the source-modifiers row below for the RDNA2 measurement instead of restating it.
Reported as #5517.
Test (docs-only change; the semantic test is the behaviour the row now describes):
No GPU needed.
Notes
neg-only 192-kernel measurement and the mode-1 quieting caveat (SHADER-190). docs: clean up the v_pack_b32_f16 source modifiers row and record its GPU-verified result #5297 rewrites the source-modifiers row at:289and leaves this one alone.absis hardware-measured, because the sources disagree: the commit that implemented it (1062df5) says no hardware run of this instruction withabsexists, whiletools/rdna2spirv.py:6280and the row below say gfx1035/gfx1036 measured it. The row now points at the row that carries that measurement rather than repeating either claim.docs/design.md:289(the source-modifiers row, docs: clean up the v_pack_b32_f16 source modifiers row and record its GPU-verified result #5297's) is left untouched.AI-assisted.