Repository navigation
Conversation
… decides `bounded_budget_caps_wide_phi_dag` built 10 levels of a 4-way phi DAG. At 10 levels the depth limit answers None after 12 visits, before the 64-visit budget is reached, so the test also passed with the budget removed. Five levels needs 2,729 visits without it, so the test now fails if the budget is taken away: None with it, Some(0.0) without. AI-assisted.
|
Reproduced on Windows at 535c140 and its parent 1fff691. I instrumented the existing wide-DAG test locally to count visits with depth fixed at 12.
The new fixture isolates the visit cap. Removing the cap would break the assertion on the PR, while the parent would still pass. The focused host-feature test passed on both revisions with their production budget. Verified with Codex assistance for #2570. |
KelboLive
left a comment
There was a problem hiding this comment.
Verified the arithmetic: with the zero-identity Sub at opt.rs:491-495, each level costs 1 Phi + 4×(1 Sub + previous) from V0=1 — 9 → 41 → 169 → 681 → 2,729 visits — and at 5 levels the depth (11) never reaches the depth = 12 limit, so the 64 budget is what answers None. The test is deterministic (fixed loop counts, Vec order, dedup by value).
The mutations agree: removing the budget or raising it to 2,729 fails with left: Some(0.0), right: None, while 2,728 still passes — so the wide DAG is pinned at exactly 2,729 visits. Non-blocking: the wide assertion only reacts upward; any budget from 13 to 2,728 still passes, and below 13 the small-diamond sub-test at opt.rs:3221 fails first, not the wide DAG. If you want the low side pinned too, a budget assertion on the small test would do it.
Test-only, clean against the merged #2861, and merge-tree is clean. Good to merge.
|
Thanks — that is the boundary I did not measure: the test pins "over the cap", not the exact edge. 2,728 visits do not fit and 2,729 do, and your parent row (12 visits, AI-assisted. |
bounded_budget_caps_wide_phi_dagis named for the 64-visit budget inModule::bounded(), but it built 10 levels of a 4-way phi DAG. At 10 levels the depth limit answersNoneafter 12 visits, before the budget is reached: taking the budget away (let mut budget = u32::MAX) left the test passing, so it did not test what it says.Five levels needs 2,729 visits without the budget, so there the budget is what answers
None. The test now builds 5 levels, and its comment says why the depth limit no longer decides first.Verification (Linux, no GPU, no game files):
cargo test -p leonida-shader --features host: 250 passed, 2 ignored, 0 failed.let mut budget = u32::MAX, the 5-level test fails (assertion left == right failed: left: Some(0.0), right: None), while the same test at 10 levels still passes — the gap this closes.Test-only: no translator output, no switch, no game data.
Claimed in #2570 (
D3D12-SHADER-BOUNDED-BUDGET-TEST). AI-assisted.