Shaders: the lane-condition search keeps the condition sets no lane meets #1491
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!1491
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1491/head"
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?
@rayderCode on GitHub · 2026-11-24 18:24 UTC · original
rayderCode:shader/waterfall-compares-select→main· +48 −5 · 1 files · 1 commits · closed without mergingSummary
Bools::meetassigns variables in order and tries each assignment's remaining conditions again, even when it has already found them to have no lane. On large programs it ran out of its 65,536 splits and answered yes, which the waterfall proof and the per-lane descriptor tracking read as a failed proof. It now keeps the condition sets it has finished without a lane, and ends at once on a node both held and not held. Only a finished search says no, so what it keeps is exact; the budget is unchanged.Effect
Translation census over the title's 26,084 programs, against
ffe310e: none lost, 61 get past resource tracking to a later refusal (a scalar memory read as data). That empties three refusals:Programs with tracked resources go from 25,724 to 25,785. DXIL emitted is unchanged, since all 61 then stop at the scalar-memory refusal. No other program changes outcome.
On one of the 15, the two queries that gave up needed 71,246 and 95,446 splits without this change and both come out as "no lane".
Verification
conditions_with_few_distinct_remainders_are_searched_to_the_end: a synthetic parity case over 40 atoms. It fails onmainand passes here.cargo clippy --workspace --all-targets --locked -- -D warnings, with and without--all-features.cargo test --workspace --locked: 343 passed, 6 ignored.cargo xtask policy: 154 files ok.Offline translation only: no title run, no DXIL validation or pipelines, and no shader contents included. AI-assisted (Claude).
🤖 Generated with Claude Code
@EduAzevedo on GitHub · 2026-11-24 19:56 UTC · original
I measured this offline on my own retail dump:
victory translate --jobs 8 --listover 26,148 programs,28c91b9vs mainffe310e. Windows 11, Ryzen 7 5700G.meetnever gives up with this branch. A local, uncommitted counter on the*budget == 0path fired in 823 refused programs on main. On this branch it fired in 0 programs, across the whole corpus. The census took 156 s, about the same as main.meetgive up. With this branch, those refusals are exactly the same. So the give-ups only came along with them, and they come from missing rules, not from the budget.MAX_MEETisn't an alternative. At 1 << 22 the same census was still running after 36 minutes, so caching the dead sets as you do is the right approach.This and #1550 don't conflict: #1550 only adds
Bools::meet_besideand uses it inwaterfall(). Counts only here, no game data. AI-assisted measurement.@sinan-cmyk on GitHub · 2026-11-24 20:13 UTC · original
Offline measurement on a retail dump, and the shader tests on Ada
Result: no count change against
main.Offline. I merged head
28c91b9ontomainffe310e(clean merge) and ranvictory translate --validate --listonshaders.rpf(1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result withmainprogram by program (25,889 programs). Validated: 21,724 onmain, 21,724 with this PR.61 programs get through resource tracking and now stop at "a scalar memory read as data", the gap that #953, #1103 and #1319 address: 38 from "a descriptor read from the first lane of computed VGPRs", 15 from "a waterfall loop whose compares do not select the access's lanes" and 8 from "a descriptor partly joined by control flow". So this PR may gain programs stacked on #1319 or #1402.
Tests: with the same merge,
cargo test --locked -p victory-shader --libpassed 121, failed 0. The bitcode benchmark is ignored, as onmain, where 120 pass. The run was on an RTX 4070 SUPER (Ada, 32-lane waves, driver 32.0.16.1088), the default adapter, withVICTORY_WARPunset.No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
@Marvisak on GitHub · 2026-11-25 00:41 UTC · original
Automated triage for the maintainers. Closing because this change is already in
main, ormainhas since replaced the code it patches.Keeping the condition sets no lane meets in
Bools::meet: main'smeet_inhas the samerefutedset (structure.rs 245-281).If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed