Repository navigation
Conversation
tedin7
reviewed
Nov 25, 2026
tedin7
left a comment
Collaborator
There was a problem hiding this comment.
Review of head 3bf6dd1 (comment only, Linux checks; the WARP draw test is run separately on Win2025).
Result: sound on code and fixtures, no blocking findings.
- Change: 13 SDWA forms lowered in
tools/pixel_aot.py(5 float-to-int/frexp_exp, 7 int-to-float, 1 pkrtz). The float-source forms reuse the existing e64/DPP bit helpers and SDWA destination placement; refusals cover src0_sel other than DWORD, sext on float sources, UNUSED_SEXT, clamp/omod on the float forms, pending loads and non-entry EXEC. - Test quality:
draw-sdwa-cvt(pixel_aot_sdwa_cvt_{warp,hardware}) draws the translated shader and compares the readback withsdwa_cvt_reference, an independent Python model (not the lowering's own helpers), plus per-group mutations that must change the result. This is the readback-vs-CPU-reference test the repo asks for.check_sdwa_cvt_controlscovers the static refusals. - I checked
v_cvt_off_f32_i4(signed nibble times 0.0625: -8 -> -0.5, 15 -> -0.0625) and the ubyte byte selection by hand against the reference. - Sibling tables: coverage tsv counts and
form_coverage_checkassertions are extended, with a single-opcode removal control. No other open or merged PR covers these opcodes (searchedSDWA cvt frexp_exp pkrtz).
Commands run locally:
python3 tests/pixel_aot_check.py-> passpython3 tests/docs_links_check.py-> ok (489 links);python3 tests/bidi_controls_check.py-> ok;git diff --check origin/main...HEAD-> cleantests/form_coverage_check.pycould not run on this Linux box (missingiced_x86); it is left to the Win2025 run.- Mutations: dropping the
src0_sel:DWORDrefusal failscheck_sdwa_cvt_controls; dropping the float-source modifier refusal fails it too; dropping the UNUSED_SEXT refusal fails the existing movrel control.
AI-assisted; commands listed were executed locally.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lowers 13
SDWAconversion, exponent, and packed-RTZ forms intools/pixel_aot.py(counted in bothdocs/coverage/gfx1013.tsvanddocs/coverage/rdna2.tsv), with static refusal controls,pixel_aot_sdwa_cvt_{warp,hardware}draw tests, LLVM 15check_binaryfixtures, andform_coverage_checkcoverage assertions:v_cvt_i32_f32_sdwa,v_cvt_u32_f32_sdwa,v_cvt_flr_i32_f32_sdwa,v_cvt_rpi_i32_f32_sdwa,v_frexp_exp_i32_f32_sdwav_cvt_f32_i32_sdwa,v_cvt_f32_u32_sdwa,v_cvt_f32_ubyte0_sdwa,v_cvt_f32_ubyte1_sdwa,v_cvt_f32_ubyte2_sdwa,v_cvt_f32_ubyte3_sdwa,v_cvt_off_f32_i4_sdwav_cvt_pkrtz_f16_f32_sdwaContracts & Semantics
f32->int32,frexp_exp,pkrtz): Require whole-dword VGPR/SGPR sources (src0_sel:DWORD, plussrc1_sel:DWORDanddst_sel:DWORDforpkrtz) with optional bit-31abs/negmodifiers (|reg|,abs(reg),-reg,-|reg|), refusingsext(),clamp, andomod.f32->int32andfrexp_expreuse the IEEE-754 saturating/special-value bit helpers (cvt_{i32,u32,flr_i32,rpi_i32}_f32,dpp_frexp_exp_i32_f32) with SDWA destination placement (BYTE_0..3,WORD_0..1,DWORD+UNUSED_PAD/UNUSED_PRESERVE);v_cvt_pkrtz_f16_f32_sdwaproduces the(lo, hi)compressed-export pair and remains exempt fromHALF_RTZrefusal.int->f32): Accept VGPR/SGPR sources withBYTE_0..3,WORD_0..1, orDWORDselection, optionalsext(), optionalclamp(saturate(...)), and SDWA destination placement, refusing float modifiers andomod.UNUSED_SEXT,UNUSED_PRESERVEon untracked/non-numeric destinations, pending scalar loads, outstanding samples, and non-entry EXEC masks.Verification
python3 tests/pixel_aot_check.py(including newcheck_sdwa_cvt_controls)form_coverage_check:check_sdwa_cvt_forms(+13 forms ingfx1013.tsvandrdna2.tsv, unlowered neighbours excluded, single-opcode removal control),check_shader_records,check_sdwa_f16_forms,check_sdwa_int_extra_forms,check_sdwa_cmp_coveragepkrtzRTZ discrimination check + manual inspection of generated HLSLpython3 tests/docs_links_check.py,python3 tests/bidi_controls_check.py,python3 tests/rdna2_tools_check.py(156 tests OK)git merge-tree --write-tree --name-only origin/main HEADandgit diff --check origin/mainpixel_aot_binaryassembly/disassembly round-trips for all 4SDWA_CVT_*fixturespixel_aot_sdwa_cvt_warp/pixel_aot_sdwa_cvt_hardwaredraws and all 16 mutations