Repository navigation
Conversation
Physical-silicon verification: extra f32 / carry / dot-accumulate DPP forms pass on wave 4 / 32 / 64Independent verification of the wave-width-independence claim ("valid across wave sizes 4 (WARP) through 64") that CI cannot cover (CI excludes PR head: Environment
Commands (exact)git fetch origin pull/423/head:pr-423; git worktree add out/wt-423 pr-423
Set-Location out/wt-423; .\tools\dev.ps1 | Out-Null; $ErrorActionPreference='Continue'
cmake --preset dev -B out/build/dev-423 "-DINTAKE_PYTHON=C:/Users/james/Documents/Xbox2Windows/out/pe-env/Scripts/python.exe"
cmake --build out/build/dev-423 # 373/373 targets, 0 errors
ctest --test-dir out/build/dev-423 --no-tests=error -R '^pixel_aot_' --output-on-failure # default adapter + WARP: 2/2 Passed
$env:XBOX2WINDOWS_ADAPTER='RX 9060 XT'; ctest --test-dir out/build/dev-423 --no-tests=error -R '^pixel_aot_hardware$' --output-on-failure
$env:XBOX2WINDOWS_ADAPTER='RTX 5060 Ti'; ctest --test-dir out/build/dev-423 --no-tests=error -R '^pixel_aot_hardware$' --output-on-failure
out/pe-env/Scripts/python.exe -B tests/pixel_aot_check.py binary out/tools/llvm-mc.exe out/tools/llvm15/bin/llvm-objcopy.exe out/tools/llvm15/bin/LLVM-C.dllResults
Wave-width verdictThe wave-width-independence claim holds on silicon as measured: bit-exact readback ( #421 (conversions) and #428 (v_movrel*) were verified in separate worktrees; separate comments posted there. AI-assisted; runs executed locally. |
|
@KomaGuy, a quick coordination question so we don't overlap: this PR adds the DPP16/DPP8 forms of This comment is AI-assisted. |
Thanks for checking! I'm away from my PC for the next ~4 hours, so I'll add the plain VOP2 e32 forms to this PR once I'm back. |
MarlomMedeiros
left a comment
There was a problem hiding this comment.
Ran the Windows gates the author could not (Linux-only environment) on Windows 11 build 26300.10075, RTX 5070 (10de:2f04) driver 32.0.16.2135, in-box WARP 10.0.26100.10068, debug layer enabled.
Results:
tests/pixel_aot_check.pycontrols (run insidebinarymode): pass.tests/form_coverage_check.py: pass. LLVM 15 gfx1013 binary round-trip: pass.pixel_aot_warpunder ctest: pass (12.3s, debug_errors=0).pixel_aot_hardware: the complete draw suite passes on the RTX 5070 when run directly,python -B tests/pixel_aot_check.py draw <dxc> offscreen_check.exe hardware: 113 renderer runs, every onemax_absolute_error=0,debug_errors=0 debug_warnings=0, including the newdpp_extraanddpp_dotcfixtures with all negative mutations reportingpixel_mismatch. Total wall time ~61s.
One non-code flag: the same run under ctest reports Timeout, because this branch's set_tests_properties(pixel_aot_hardware ... TIMEOUT 60) is 60s and the suite needs ~61s on this adapter. Not a correctness issue: current main splits draw modes so each registered test fits, and a rebase onto it resolves the bookkeeping.
Semantic review of the new code:
- The
co_ciops model carry-in conservatively: carry-out must equal carry-in (vcc/vcc_lo) andscalar["vcc"]must hold a tracked("condition", expr, 0, 1)tuple. The carry/borrow formulas (t < a || r < tfor add,a < b || t < cifor sub, mirrored for subrev) are correct for two-step carry propagation. v_dot2c_f32_f16_dppapplies abs/neg at the packed halfword level (0x7fff7fff/0x80008000) and accumulatesdst's prior value;v_dot4c_i32_i8_dppsign-extends each byte lane with<<24 >>24arithmetic shifts. Both match ISA semantics.v_mac_f32_dppcorrectly readsdstbefore writing (mad(a, b, acc)), anddpp_extra_vgprrejects non-VGPR operands and uninitialized destinations.mods_ok = is_dpp16 and allow_fp_modsenforces both ISA rules at once: DPP8 never takes source modifiers, and integer ops never take fp modifiers.frexphelpers are bit-exact (subnormal normalization viafirstbithigh, inf/NaN/zero passthrough, exponent forced to 0.5<=m<1), consistent with the existing f32 frexp/ldexp approach.- Interaction with #651: all new
_dppmnemonics are auto-denied inside exec-masked regions by the existing_dpppattern, which is correct since quad-local ops are not pure per-lane.
Base note: this branch sits on a8e2d39 and carries its own dpp_extra_vgpr/parse_dpp_suffix/emit_quad_swizzle_u32; current main already has dpp_vgpr/parse_dpp/emit_quad_swizzle_u32 plus the dpp and dpp_int32 fixtures, so the rebase will want to fold DPP_EXTRA onto the upstream helpers rather than keep parallel copies.
No blockers on the change itself.
AI-assisted: yes. All reported checks ran locally on the adapter and driver listed.
|
Added the plain VOP2 e32 dot-accumulate forms (
All 4/4 CI checks are green ( |
Change
Lower quad-local
DPP16(quad_perm) andDPP8(dpp8) forms for the remaining 12 extraf32, carry-in/carry-outu32, andgfx1030dot-accumulate instructions intools/pixel_aot.py, covering 12 additionalDPP16and 12 additionalDPP8forms ongfx1013(+24 forms) and 11 additionalDPP16and 11 additionalDPP8forms ongfx1030(+22 forms;v_mac_f32_dppisgfx1013-only):v_*_dppinstructions (12):f32unary & accumulate (7):v_rndne_f32_dpp,v_sin_f32_dpp,v_cos_f32_dpp,v_rcp_iflag_f32_dpp,v_frexp_mant_f32_dpp,v_frexp_exp_i32_f32_dpp,v_mac_f32_dpp.u32(3):v_add_co_ci_u32_dpp,v_sub_co_ci_u32_dpp,v_subrev_co_ci_u32_dpp(reading and updating the trackedvcc/vcc_loper-lane condition).gfx1030, 2):v_dot2c_f32_f16_dppandv_dot4c_i32_i8_dpp.src0asuintbits through SM 6.0 quad intrinsics, handlesfrexpsubnormals purely with bitwisefirstbithigh(immune to desktop denormal flushing), appliesDPP16-/|.|modifiers on floating-point and packedf16x2(v_dot2c_f32_f16_dpp) operands, emits optional helpers only when used, and rejects modifiers onDPP8or integer ops, cross-quadDPP8,row_*/wave_*, partial masks, non-VGPR operands, uninitialized accumulators, untracked/mismatchedvcc, WQM, andvmcnthazards.DPP_EXTRA_BODY(assembled ongfx1013, 2 constant sets, 5 negative mutations) andDPP_DOTC_BODY(assembled ongfx1030, 2 constant sets, 4 negative mutations) derive quad coordinates fromuv.x/uv.yand exercise all 12 forms end to end.Verification
Tested on Linux x86_64 (Python 3.13.5, LLVM 19.1.7, Clang 19.1.7) on top of
e5e0079:python3 -B tests/pixel_aot_check.py binary llvm-mc-19 llvm-objcopy-19 libLLVM-19.so— passed (controls, negative controls,gfx1013assembly→DXBC/XDAT/XBCH/FSSM→disassembly→lowering parity forDPP_EXTRA_BODYand all existing fixtures, andgfx1030parity forDPP_DOTC_BODY).python3 -B tests/ffx_dispatch_aot_check.py llvm-mc-19 llvm-objcopy-19 libLLVM-19.so— passed.python3 -B tests/script_state_check.py,tests/bcpack_check.py,tests/resource_ranges_check.py,tests/layout_chunks_check.py,tests/docs_links_check.py,tests/bidi_controls_check.py— all passed.tools/form_coverage.pyrecords 12DPP16+ 12DPP8forms againstdocs/coverage/gfx1013.tsvand 11DPP16+ 11DPP8forms againstdocs/coverage/rdna2.tsv.DPP_EXTRA_BODY,DPP_DOTC_BODY, all 9 negative mutations, andfrexpsubnormal/±0/±Inf/NaN edge cases on a 4-lane SIMT 2×2 pixel quad C++20 harness withclang++-19 -std=c++20 -O2 -Wall -Wextra -Wpedantic -Werror -fsanitize=undefined,address— bit-exact match across all 4 quad lanes and all 9 mutations caught; 0 sanitizer errors.dxc -Gis -T ps_6_0), WARP (pixel_aot_warp), and hardware (pixel_aot_hardware) checks were not run locally on Linux; relying on thebuild-and-testWindows CI job to verify DXC compilation and D3D12 WARP quad readback.Evidence and follow-up
tests/pixel_aot_check.pyare original MIT-licensedgfx1013/gfx1030assembly sequences built from source at test time.f32/move/select), shader: lower quad-local DPP16 and DPP8 32-bit integer/bitwise/shift ops in pixel_aot #414 (23 integer/bitwise/shift), shader: lower quad-local DPP16 and DPP8 binary16 ops in pixel_aot #419 (23f16), and shader: lower quad-local DPP16 and DPP8 conversion ops in pixel_aot #421 (19 conversions) with zero opcode overlap (combined97/101DPP16+97/101DPP8ongfx1013,96/100ongfx1030, leaving only the 4v_movrel*dynamic VGPR-indexing forms).Checklist