Repository navigation
Conversation
`Lower::valu` computes the DPP-selected source 0 and stores it in `self.src0`, which `fsrc`, `src`, `half_src` and `v_cndmask_b32` read. `Lower::fmac_half` called `self.operand` directly, so a `v_pk_fmac_f16` with DPP16/DPP8 multiplied the executing lane's own src0 and dropped the cross-lane value for both packed halves. Read `self.src0` for source 0 there too. The test shifts lane 0's source out of its row with `bound_ctrl` (so it is zero): with the DPP read the product is 0, without it 2.0 * 2.0.
WARP refuses a pipeline for this program ("The parameter is incorrect");
the hardware runs it and is the reference for a DPP source.
DenRakEiw
left a comment
There was a problem hiding this comment.
Verified locally merged onto origin/main (940d32f, Windows 11 x64, NVIDIA GeForce RTX 5090 + WARP, Rust 1.98.1 MSVC, with dxil.dll validator):
cargo test -p victory-shader --lib packed_fmac_multiplies_the_dpp_selected_lane— passed on both RTX 5090 hardware andVICTORY_D3D12_WARP=1cargo clippy -p victory-shader --all-targets— 0 warningscargo xtask policy— ok (183 files ok)
Clean fix reading the DPP-selected lane in v_pk_fmac_f16, verified on hardware and WARP. (Note for triage: overlaps #2229.)
AI-assisted (Gemini 4 Neon).
catminou4
left a comment
There was a problem hiding this comment.
Tested locally: merged into main 940d32f, cargo test -p victory-shader --locked on macOS arm64 — 144 passed, 0 failed, 2 ignored (Windows-gated hardware execution tests not run here). Approving — v_pk_fmac_f16 with DPP now multiplies the DPP-selected lane's src0 (follow-up to #2229). The new test is hardware-gated (needs an SM 6.6 device) so it no-ops here; lowering compiles and the suite stays green on macOS.
|
Hardware run of the DPP case on an RX 7800 XT (RDNA3), Windows 10 19045 with SM 6.6 via the Agility runtime for the test binaries (#486): That closes the half CI could not cover: with the fix, lane 0's |
Offline measurement on a retail dumpResult: no count change against I merged head 1483d37 onto No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right. No shader names or data are included, per the asset policy. AI-assisted (Claude Code). |
|
That measurement is the right one for what this PR is, and no count change is the expected result: the fix does not make a program translate that did not — it changes a value the translated program emits. So 25,889 programs with 23,917 validated on both heads is exactly the "rejects nothing" evidence I want on record, and the value itself is checked where it can be: Thanks for running it — with the metric stated as narrowly as you stated it, it is a useful data point rather than a misleading one. |
|
Automated triage for the maintainers. Merge candidate (worth a look; small). Generated by Claude Code |
|
Same one-line fix as #2229, which was opened about an hour earlier, so one of the two can be closed. The fix is the same in both; I ran each PR's test on the three devices of a hybrid laptop:
The test's own comment expects WARP to refuse the pipeline, but it only skips when Checked on Windows 11 against heads 754e60e (#2229) and 1483d37 (#2266). AI-assisted. |
|
Closing in favour of #2229, which is the earlier PR for #2228 and is the better-tested one: rminzao's table shows it passing on Intel UHD (16-lane waves), the RTX 4050 and WARP, with the same one-line fix, while this PR's test panics on any host whose waves are narrower than 32 (the compute program declares the console's wave). The test here could be fixed, but there is no reason for two PRs for the same line; #2229 carries it. Thanks for the three-device run — it is exactly the comparison that settles it. |
fyernald
left a comment
There was a problem hiding this comment.
Tested on RTX 3080 (617.42), Windows 10 (19045) plus WARP, main 67e8ae1 + #486 + #2596 (the suite crashes on NVIDIA without #2596, #2571). cargo test -p victory-shader --lib --locked -- --test-threads=1: 268 passed, 3 failed (the #1835 ones, also on the base). packed_fmac_multiplies_the_dpp_selected_lane passes.
This is the same change as #2229, which was opened an hour earlier: self.src0 for k == 0 in the packed-operand read. Only one of the two should land, and #2229 has the larger test.
Fixes #2228.
Problem
Lower::valucomputes the source 0 a DPP16/DPP8 instruction selects and stores it inself.src0; the source readers (fsrc,src,half_src,v_cndmask_b32) take it from there.Lower::fmac_halfcalledself.operand(inst, &op)directly, sov_pk_fmac_f16with DPP multiplied the executing lane's own src0 for both packed halves — the cross-lane value was dropped although the DPP lane read was emitted.Change
fmac_halfusesself.src0for source 0 when it is set, like the other readers; the high-half extraction and the 16-bit arithmetic around it are unchanged.Verification
GPU test
packed_fmac_multiplies_the_dpp_selected_lane: av_pk_fmac_f16withrow_shr:1andbound_ctrl, where lane 0's shifted source is out of its row, so the DPP source is zero and the product is0 * 2.0. With the old read the result is2.0 * 2.0. Skipped on this host (no SM 6.6 device; #1991 is not in this branch) and executed in CI.cargo clippy -p victory-shader --all-targets -- -D warningsclean,cargo xtask policy2 files ok. The rest of the suite here still shows the known no-device environment failures.