Repository navigation
Conversation
|
@KomaGuy Independent AMD (RDNA4, native wave64) result on Environment
CommandsObserved
What it establishesThe binary16 quad-local ops produce bit-identical output to the CPU reference on a native wave64 adapter, with the LimitThe harness prints per-draw counters but no per-program label, so this is a whole-suite result rather than a per-form attribution. And this run is on the PR head only: the tree has no per-case AI-assisted; runs executed locally. |
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: pass.tests/form_coverage_check.py: pass. LLVM 15 gfx1013 binary round-trip: pass.pixel_aot_warp: pass (12.38s, debug_errors=0).pixel_aot_hardware: the newcheck_dpp_f16_drawitself ran and passed on the RTX 5070 (it is invoked beforecheck_dpp_drawincheck_render, which is where the test aborts). DXC compiles the generated HLSL and all five mutations reportpixel_mismatchas designed.
One non-code issue: the run then fails in the pre-existing f32 dpp fixture with Translated pixel pipeline failed (HRESULT 0x8007000e) on the RTX 5070. That failure is a stale-base artifact, not a defect in this change: upstream b7a0597 (#569) already fixed this exact NVIDIA PSO failure by switching the dpp fixture to mode="any", and it is not in this branch's merge base (579f58f). A fresh merge or rebase onto current main should turn the hardware run green. The PR's own mode="any" commit for dpp_f16 is incidentally the same remedy.
Semantic review of the new code:
DPP_F16table is faithful: f16 ops pack viapack16_rneand merge withvdst[31:16]preserved (dpp{i}_hi | dpp{i}_lo), matching gfx1013 16-bit destination semantics.v_fmac_f16_dppcorrectly accumulatesprev_valof the destination VGPR;v_ldexp_f16_dppsign-extends the low-16 exponent operand;v_cvt_f16_f32_dppreads its source as f32 rather thanwiden16— all three special cases handled.allow_mods = not is_dpp8enforces the ISA rule that DPP8 forms take no source modifiers.fract16,dpp_ldexp_f16,dpp_frexp_*_f16are bit-exact helpers (zero/inf/NaN passthrough, exponent clamps, mantissa forced into [0.5,1)), consistent with the f32 frexp/ldexp approach documented in experiments.- Interaction with #651: the new
v_*_f16_dppmnemonics are auto-denied inside exec-masked regions by the existing_dpppattern inREGION_DENIED— correct, since quad-local ops are not pure per-lane.
No blockers on the change itself; flagging only the stale base for the hardware gate.
AI-assisted: yes. All reported checks ran locally on the adapter and driver listed.
|
Independent RTX 3060 Ti run on cmake --preset dev "-DINTAKE_PYTHON=$((Get-Command python).Source)" "-DDXC_EXECUTABLE=$dxc" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug
cmake --build --preset dev --parallel 4 --target offscreen_check
$env:XBOX2WINDOWS_ADAPTER = 'RTX 3060 Ti'
ctest --preset dev --no-tests=error -V -R '^pixel_aot_(hardware|warp)$'
I also ran AI-assisted. All tests were run locally. |
|
Thanks @thepatrickworld (RX 9070 XT wave64), @rwZephyr (RTX 3060 Ti), and @MarlomMedeiros (RTX 5070 + semantic review) for the independent hardware runs! Merged latest |
|
I fast-forwarded the branch to |
@R0Y00 Thanks for fast-forwarding and catching that v_cos_f16(0.25) mismatch! I don't have a native gfx1013 readback or a DPP-specific reference for the preserved upper half on hand. I'm away from my PC for ~8 hours, so feel free to merge as-is if the current sentinel check looks good to you, or let me know if you'd like me to dig into the ISA docs once I'm back. |
Change
Lower quad-local
DPP16(quad_perm) andDPP8(dpp8) forms for all 23 binary16VOP1/VOP2operations intools/pixel_aot.py, covering 23 additionalDPP16and 23 additionalDPP8forms (+46 forms on bothgfx1013andgfx1030):v_*_dppinstructions (23):v_cvt_f16_f32_dpp,v_ldexp_f16_dpp,v_frexp_mant_f16_dpp,v_frexp_exp_i16_f16_dpp.v_add_f16_dpp,v_sub_f16_dpp,v_subrev_f16_dpp,v_mul_f16_dpp,v_min_f16_dpp,v_max_f16_dpp,v_fmac_f16_dpp.v_floor_f16_dpp,v_ceil_f16_dpp,v_trunc_f16_dpp,v_rndne_f16_dpp,v_fract_f16_dpp.v_log_f16_dpp,v_exp_f16_dpp,v_rcp_f16_dpp,v_sqrt_f16_dpp,v_rsq_f16_dpp,v_sin_f16_dpp,v_cos_f16_dpp.src0asuintbits via SM 6.0 quad intrinsics, preservesvdst[31:16]pergfx101316-bit destination semantics (rejecting uninitialized destination VGPRs), and packs binary16 results with an optionalpack16_rnehelper (plusmin16_num/max16_num,fract16, and exact bit-leveldpp_ldexp_f16/dpp_frexp_{mant,exp}_f16helpers emitted only when used).v_sin_f16_dppandv_cos_f16_dppscale turn inputs by2π.DPP8,row_*/wave_*controls, partial masks (row_mask/bank_mask != 0xf), source modifiers onDPP8and onv_ldexp_f16_dpp'si16exponent operand, non-VGPR operands, WQM, andvmcnthazards.DPP_F16_BODYderives binary16 quad lane ID{0, 1, 2, 3}fromuv.x/uv.y, tests all 23 forms across 2 constant sets (with junk in the high 16 bits of inputs), and checks 5 negative mutations (AcrossXvsAcrossY, cyclicdpp8rotation,rndnetie-to-even,sinvscosturns, andDPP16negation).Verification
Tested on Linux x86_64 (Python 3.13.5, LLVM 19.1.7, Clang 19.1.7) on top of
6549244:python3 -B tests/pixel_aot_check.py binary llvm-mc-19 llvm-objcopy-19 libLLVM-19.so— passed (controls, negative controls, andllvm-mc -mcpu=gfx1013assembly→DXBC/XDAT/XBCH/FSSM→disassembly→lowering parity forDPP_F16_BODYand all existing fixtures).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 23DPP16and 23DPP8forms against bothdocs/coverage/gfx1013.tsvanddocs/coverage/rdna2.tsv.DPP_F16_BODYand all 5 negative mutations 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 on both constant sets and all 5 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-licensedgfx1013assembly sequences built from source at test time.f32/move/selectDPPforms) and shader: lower quad-local DPP16 and DPP8 32-bit integer/bitwise/shift ops in pixel_aot #414 (23 integer/bitwise/shiftDPPforms) with zero opcode overlap (combined66/101DPP16+66/101DPP8).Checklist