shader: expand constant dot4 multiplicands to avoid Arc IGC miscompilation #2536
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2536
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2536"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@UnkwnDev on GitHub · 2026-11-25 15:26 UTC · original
UnkwnDev:arc-dot4-constant-fix→main· +230 −18 · 3 files · 1 commits · openFixes \spx_programs_run_with_the_hardwares_dot_products\ (and equivalent \_dot4_i32_i8\ / \_dot4c_i32_i8\ sequences) failing on Intel Arc A770 hardware while passing on WARP.
Root Cause
When a packed byte dot-product multiplicand evaluates at DXIL compile time to a 16-bit constant (such as the FidelityFX \sel_hi_lo(2.0)\ operand \
@Marvisak on GitHub · 2026-11-25 15:55 UTC · original · edited 2026-11-25 20:22 UTC
Automated triage for the maintainers.
Proposed close: duplicate of #2408. This PR's head (
a3a18d6) has not changed since the last review. #2408 (open, merges cleanly, CI passing) makes the same change incrates/victory-shader/src/emit/lower.rs. A newdot4_i8expands a constant multiplicand over its non-zero bytes instead of passing it todot4AddPacked.i32, and it is backed by a constant evaluator inemit/bitcode.rs(known_i32there,eval_u32here). #2408 also cites the driver evidence this PR lacked (#1829, #1896) and has the larger test suite.Reply to the author: thanks for comparing the two. We agree that #2408 is the one to land. The
_dot4_u32_u8extension you mention fits better in #2202 once that is rebased on #2408, so nothing here needs to stay open for it.This PR will be closed in 48 hours unless the author pushes a change or a maintainer removes the label.
CI:
checkpassed (Windows).Generated by Claude Code
@upipibi on GitHub · 2026-11-25 16:35 UTC · original
#2408 (KainanP,
2644bbc, open; the triage calls it a merge candidate) makes the same change:dot4_i8takes a constant multiplicand by hand over its non-zero bytes instead of passing it todot4AddPacked.i32, with a constant evaluator added toemit/bitcode.rs(about 100 lines in both). Its description also cites the driver evidence the triage asks for here: #1829 (Intel Xe-LP reads a constantdot4AddPackedoperand that fits in 16 bits as its low half in both halves) and #1896 (the RTX 5070 does the same for 0x4000). It may be simplest to compare the two before either goes further.AI-assisted (Claude Code, Claude Opus 5.5). Compared the two diffs only; nothing run.
@UnkwnDev on GitHub · 2026-11-25 17:16 UTC · original
@upipibi Thanks for the pointer.
I compared the two diffs:
Since #2408 is already designated a merge candidate by the triage for main, landing #2408 first is the cleaner approach. Once #2408 is merged into main, we can close #2536 as superseded and rebase #2202 on top of #2408's known_i32 foundation to extend constant expansion to _dot4_u32_u8.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.