Repository navigation
shader: lower quad-local DPP16 and DPP8 cvt_flr, cvt_rpi, and cvt_pkrtz in pixel_aot - #1941
Merged
Merged
Conversation
…tz in pixel_aot Extend the quad-local conversion DPP16/DPP8 slice (R0Y00#421) with the three remaining full-32-bit/export conversion opcodes (6 forms total across DPP16 and DPP8 on gfx1013 and rdna2): - v_cvt_flr_i32_f32_dpp and v_cvt_rpi_i32_f32_dpp added to DPP_CVT, reusing the shared cvt_flr_i32_f32 and cvt_rpi_i32_f32 helpers (handling fractional rounding, saturation, infinity, and signed NaNs as in R0Y00#1885) with DPP16 abs/neg bit modifiers and DPP8 modifier refusal. - v_cvt_pkrtz_f16_f32_dpp lowered as a compressed-export pair matching v_cvt_pkrtz_f16_f32_e32: src0 is quad-swizzled via emit_quad_swizzle_u32, src1 stays on the current lane, DPP16 accepts abs/neg on either source, and non-export reads of the packed destination remain refused. Extend pixel_aot_dpp_cvt_{warp,hardware} with raw-word flr_rpi rows (including fractional half-integers, overflow, infinities, signed NaNs, and 5 mutations) and a compressed-export pkrtz draw (with RTZ-vs-RNE mismatch control and 4 routing/modifier mutations), add both fixtures to check_binary, and update form_coverage_check and docs/experiments.md.
tedin7
reviewed
Nov 24, 2026
tedin7
left a comment
Collaborator
There was a problem hiding this comment.
Review of head f6c377b90f0701e7906e89730f40bcd774903590.
Result: 0 P1, 0 P2. No blocking findings.
Read the full diff (tools/pixel_aot.py, tests/pixel_aot_check.py, tests/form_coverage_check.py, docs/experiments.md). No CMakeLists.txt change. Clean-room: no external code or vendor material, only the lowering and its tests.
Commands run:
python3 tests/pixel_aot_check.pyon Linux: PASSpython3 tests/docs_links_check.py: PASSpython3 tests/bidi_controls_check.py: PASSgit diff --check origin/main...HEAD: PASSgit merge-tree --write-tree --name-only origin/main HEAD: no conflictstests/form_coverage_check.pylocally needsiced_x86(not installed here); it ran and passed inside the Windows run and the Linux CI job passed.- Win2025 (Build 26100, MSVC 14.44, D3D12 WARP), Debug and Release /O2,
ctest -R '^pixel_aot_dpp_cvt_': 2/2 passed in each, plustests/pixel_aot_check.pyok. - CI at this head: Windows build and test, Linux Python checks, gfx1013 fixtures all pass.
Mutations (each restored with git checkout -- .):
- In the
v_cvt_pkrtz_f16_f32_dpplowering, swap the (lo, hi) pair: Linux check does not see it, but both Win2025 draw testspixel_aot_dpp_cvt_warpandpixel_aot_dpp_cvt_hardwareFAIL with a pixel mismatch. Killed. - Map
cvt_rpi_i32_f32to the floor helper inDPP_CVT:tests/pixel_aot_check.pyfails (check_dpp_cvt_refusals). Killed.
Notes (non-blocking): the new pkrtz result is a tuple that is only valid for compressed export; the docs state that non-export reads are refused.
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
Follow-up to #421 lowering the remaining 3 non-scalar-f16 conversion DPP opcodes (6 forms total across
DPP16andDPP8ongfx1013andrdna2):v_cvt_flr_i32_f32_dpp&v_cvt_rpi_i32_f32_dpp(4 forms): Added toDPP_CVTintools/pixel_aot.py, reusing the sharedcvt_flr_i32_f32andcvt_rpi_i32_f32helpers (including NaN/inf/saturation from shader: define v_cvt_rpi/flr_i32_f32 for NaN, infinity and overflow in pixel_aot #1885), with DPP16abs/negbit modifiers and DPP8 modifier refusal.v_cvt_pkrtz_f16_f32_dpp(2 forms): Swizzlessrc0across the quad viaemit_quad_swizzle_u32, keepssrc1on the current lane, supports DPP16abs/negon either source (refused on DPP8), respectsHALF_ROUNDING_EXEMPT, and writes the same compressed-export pair tuple asv_cvt_pkrtz_f16_f32_e32(keeping non-export ALU reads refused).check_dpp_cvt_draw(pixel_aot_dpp_cvt_{warp,hardware}) withDPP_CVT_FLR_RPI(6 rows + 5 mutations) anddpp_pkrtz_program()(2 compressed-export rows + RTZ-vs-RNE wrong-reference mismatch + 4 routing/modifier mutations).check_dpp_cvt_refusals,check_binary(LLVM binary round-trip for both new fixtures),tests/form_coverage_check.py(all 6 forms counted ongfx1013.tsvandrdna2.tsv,_sdwakept excluded), anddocs/experiments.md.Verification
python3 -B tests/pixel_aot_check.py— passedpython3 -B tests/rdna2_tools_check.py— 149 tests OKform_coverage_check.check_shader_records()— passed (+6 DPP16/DPP8 forms ongfx1013andrdna2)llvm-mc-19 -triple=amdgcn--amdpal -mcpu=gfx1013and verified round-trip translation via bothdisasm_rdna2andlibLLVM-19.sodocs_links_check.py,bidi_controls_check.py,git diff --check— passedpixel_aot_dpp_cvt_warp) and LLVM 15 fixture assembly are pending CI.