findings: what the static-sampler places do on driver 621.24 #2921

Closed
fiestorra wants to merge 1 commit from upstream-pr/2921 into main
fiestorra commented 2026-12-01 18:24:49 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T18:24:49Z.


pipeline/places.rs is a model of one card and one driver — its own first lines say RTX 4060 Ti, 616.64 — and findings.md records that model. On an RTX 4090 with 621.24, four of its five tests fail, and the reason is one behaviour the model gets the other way round. This adds that measurement to findings.md, where the rest of it lives.

The measurement. the_table_of_static_samplers prints the places 0 to 15 hold after each of its steps. The one that differs:

host                : places 0 to 15 hold [0, 1, ..., 15]
host;make=22,20,21  : places 0 to 15 hold [0, 1, ..., 15]     <- unchanged

The model says the three samplers made since take 0, 1 and 2 and the sixteen slide to 3..15 — [22, 20, 21, 0..12], which is the vector the section above records for 616.64. On 621.24 they do not slide: a loaded pipeline keeps the places it was stored with. KelboLive measured the same on an RTX 4070 Ti SUPER with 621.01, and a_loaded_pipeline_keeps_its_places_or_loses_them prints keeps its places on both.

At run time nothing harmful follows. Places::check loads a stored pipeline and compares it with one made now; on 621.24 it finds no difference, reports same, and the library is used — correctly, because the places really are the ones the pipeline was stored with. The numbering at the start still happens; it is now unnecessary on this driver rather than wrong.

For the tests it changes four, red on 621.24 and only there. the_check_looks_at_every_kind_of_sampler is the clearest: it makes the places shift on purpose and expects the check to say so; with no shift the check answers same, which is the truth.

What this does not do: update those four. With one driver measured and the other machine missing, a test that accepted both would stop reporting the change it exists to report. What would settle it is the command already in the section above — cargo test -p leonida-gpu --features diagnostics --lib pipeline::places -- --ignored — run on a 40-series card with 616.64; two runs of it there and here say whether the bit is the driver version or the card.

Nothing but the document: one file, 37 lines, no code and no test touched.

AI-assisted: yes — DeepSeek v4.1 (flash), which ran the model, printed the places, and then found the driver had moved.

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5591870685 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2921). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T18:24:49Z. --- **`pipeline/places.rs` is a model of one card and one driver — its own first lines say RTX 4060 Ti, 616.64 — and `findings.md` records that model. On an RTX 4090 with 621.24, four of its five tests fail, and the reason is one behaviour the model gets the other way round. This adds that measurement to `findings.md`, where the rest of it lives.** **The measurement.** `the_table_of_static_samplers` prints the places 0 to 15 hold after each of its steps. The one that differs: ``` host : places 0 to 15 hold [0, 1, ..., 15] host;make=22,20,21 : places 0 to 15 hold [0, 1, ..., 15] <- unchanged ``` **The model says the three samplers made since take 0, 1 and 2 and the sixteen slide to 3..15** — `[22, 20, 21, 0..12]`, which is the vector the section above records for 616.64. **On 621.24 they do not slide: a loaded pipeline keeps the places it was stored with.** **KelboLive measured the same on an RTX 4070 Ti SUPER with 621.01**, and `a_loaded_pipeline_keeps_its_places_or_loses_them` prints `keeps its places` on both. **At run time nothing harmful follows.** `Places::check` loads a stored pipeline and compares it with one made now; on 621.24 it finds no difference, reports `same`, and the library is used — **correctly, because the places really are the ones the pipeline was stored with.** The numbering at the start still happens; it is now unnecessary on this driver rather than wrong. **For the tests it changes four, red on 621.24 and only there.** `the_check_looks_at_every_kind_of_sampler` is the clearest: it makes the places shift on purpose and expects the check to say so; with no shift the check answers `same`, which is the truth. **What this does not do**: **update those four.** With one driver measured and the other machine missing, a test that accepted both would stop reporting the change it exists to report. **What would settle it** is the command already in the section above — `cargo test -p leonida-gpu --features diagnostics --lib pipeline::places -- --ignored` — run on a 40-series card with 616.64; two runs of it there and here say whether the bit is the driver version or the card. **Nothing but the document**: one file, 37 lines, no code and no test touched. **AI-assisted:** yes — DeepSeek v4.1 (flash), which ran the model, printed the places, and then found the driver had moved. Written with an AI assistant.
KelboLive commented 2026-12-01 18:46:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-12-01T18:46:38Z.

Review: CHANGES_REQUESTED


Blocking: the conclusion does not hold on the card this section cites. On an RTX 4070 Ti SUPER / 621.01, store pipe=g:0-15, then run host;make=22,20,21;pipe=g:0-15 and the loaded graphics pipeline reads [22, 20, 21, 0..12] (wrong 16), while the c and s controls read [0..15] (wrong 0). The suite reproduces it independently: a_stored_pipeline... second run has g [43,44] wrong 2 (tests.rs:857), and pipelines_with... has g [2,3] for [4,5] with places: "same" (tests.rs:1025).

So the places still slide — only compute/stream changed on 621.x. And Places::check compiles and loads compute only (places.rs:586-603), so a make-before-the-list run answers same, the library is used, and graphics pipelines sample through the wrong samplers. That is the harm the check exists to prevent, so "nothing harmful" (findings.md:588-591) and "unnecessary rather than wrong" do not hold for graphics. The model needs splitting by pipeline kind, not accepting both outcomes.

Four factual corrections:

  1. findings.md:585 cites a test that does not exist — a_loaded_pipeline_keeps_its_places_or_loses_them. The open #2887 adds ..._or_gives_them_back, and it is compute-only, so it prints "keeps" and misses this case. Don't lean on an unmerged PR for the section's evidence, and use its real name if you do.
  2. 3..15 should be 3..18 (:583-584): sixteen places cannot occupy 13 slots, and [22,20,21,0..12] shows only 13 in the window.
  3. "four of its five tests" (:568, :593) — the file has 12 #[test]/7 card tests; name the four (857, 915, 1025, 1216). "All of them asserting the 616.64 vectors" is also wrong: 1025 fails on a graphics read, and 1112/1216 assert places == "differ".
  4. The "two runs on a 40-series card with 616.64" comparison cannot separate driver from card (:598-600) — that is the existing 4060 Ti baseline. The missing cells are 616.64 on the 4090 (or 621.x on the 4060 Ti), per pipeline kind.

Structure: the new ## at :565 re-parents the pre-existing ### The precompile and the game's pipelines (:602) under the 621.24 section — move the new section below it or make it ###.

Verified good: +37/−0 one file, the two quoted host lines reproduce exactly, the LEONIDA_LIBRARY_STATIC_SAMPLERS description is right (places.rs:1078-1132), docs tests and d3d12_switches.py --check pass, and merge-tree is clean.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6137765069 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2921#pullrequestreview-6137765069). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-12-01T18:46:38Z. **Review:** CHANGES_REQUESTED --- Blocking: the conclusion does not hold on the card this section cites. On an RTX 4070 Ti SUPER / 621.01, store `pipe=g:0-15`, then run `host;make=22,20,21;pipe=g:0-15` and the loaded **graphics** pipeline reads `[22, 20, 21, 0..12]` (wrong 16), while the `c` and `s` controls read `[0..15]` (wrong 0). The suite reproduces it independently: `a_stored_pipeline...` second run has `g [43,44] wrong 2` (`tests.rs:857`), and `pipelines_with...` has `g [2,3]` for `[4,5]` with `places: "same"` (`tests.rs:1025`). So the places still slide — only compute/stream changed on 621.x. And `Places::check` compiles and loads **compute only** (`places.rs:586-603`), so a make-before-the-list run answers `same`, the library is used, and graphics pipelines sample through the wrong samplers. That is the harm the check exists to prevent, so "nothing harmful" (`findings.md:588-591`) and "unnecessary rather than wrong" do not hold for graphics. The model needs splitting by pipeline kind, not accepting both outcomes. Four factual corrections: 1. **`findings.md:585` cites a test that does not exist** — `a_loaded_pipeline_keeps_its_places_or_loses_them`. The open #2887 adds `..._or_gives_them_back`, and it is compute-only, so it prints "keeps" and misses this case. Don't lean on an unmerged PR for the section's evidence, and use its real name if you do. 2. **`3..15` should be `3..18`** (`:583-584`): sixteen places cannot occupy 13 slots, and `[22,20,21,0..12]` shows only 13 in the window. 3. **"four of its five tests"** (`:568`, `:593`) — the file has 12 `#[test]`/7 card tests; name the four (857, 915, 1025, 1216). "All of them asserting the 616.64 vectors" is also wrong: 1025 fails on a graphics read, and 1112/1216 assert `places == "differ"`. 4. **The "two runs on a 40-series card with 616.64" comparison cannot separate driver from card** (`:598-600`) — that is the existing 4060 Ti baseline. The missing cells are 616.64 on the 4090 (or 621.x on the 4060 Ti), per pipeline kind. Structure: the new `##` at `:565` re-parents the pre-existing `### The precompile and the game's pipelines` (`:602`) under the 621.24 section — move the new section below it or make it `###`. Verified good: +37/−0 one file, the two quoted host lines reproduce exactly, the `LEONIDA_LIBRARY_STATIC_SAMPLERS` description is right (`places.rs:1078-1132`), docs tests and `d3d12_switches.py --check` pass, and `merge-tree` is clean.
Christopher-Sundeby commented 2026-12-01 18:49:17 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Christopher-Sundeby on 2026-12-01T18:49:17Z.


One correction to "at run time nothing harmful follows": it holds for compute pipelines, not for graphics ones.

Your own 621.24 run of a_stored_pipeline_reads_through_the_places_of_the_run_that_stored_it shows it. The loaded pipelines read [[6, 7], [43, 44], [1, 2, 3]] (s, g, c). The graphics one reads [43, 44], the samplers now at its stored places, instead of [4, 5]. The RTX 5090 with 621.40 gives the same vector in every run. In the same test, a careless run (=1, two samplers made first) loads the graphics pipeline with wrong 2 in every run, and occasionally a compute one as well (details on #2887).

The "keeps its places" probe and the places 0 to 15 hold [0..15] step both use compute pipelines only. Places::check also probed with compute only, so on these drivers it answered same while graphics pipelines read through other samplers. #2919 adds a drawn probe for that. The findings entry would be accurate as "a loaded compute pipeline keeps its places; a loaded graphics pipeline does not".

AI-assisted: yes (Claude Opus 5.5, via Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7321610967 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2921#issuecomment-7321610967). Originally posted by [Christopher-Sundeby](https://github.com/Christopher-Sundeby) on 2026-12-01T18:49:17Z. --- One correction to "at run time nothing harmful follows": it holds for compute pipelines, not for graphics ones. Your own 621.24 run of `a_stored_pipeline_reads_through_the_places_of_the_run_that_stored_it` shows it. The loaded pipelines read `[[6, 7], [43, 44], [1, 2, 3]]` (s, g, c). The graphics one reads `[43, 44]`, the samplers now at its stored places, instead of `[4, 5]`. The RTX 5090 with 621.40 gives the same vector in every run. In the same test, a careless run (`=1`, two samplers made first) loads the graphics pipeline with `wrong 2` in every run, and occasionally a compute one as well (details on #2887). The "keeps its places" probe and the `places 0 to 15 hold [0..15]` step both use compute pipelines only. `Places::check` also probed with compute only, so on these drivers it answered `same` while graphics pipelines read through other samplers. #2919 adds a drawn probe for that. The findings entry would be accurate as "a loaded **compute** pipeline keeps its places; a loaded graphics pipeline does not". AI-assisted: yes (Claude Opus 5.5, via Claude Code).
fiestorra commented 2026-12-01 23:27:43 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by fiestorra on 2026-12-01T23:27:43Z.


Closing in favour of #2996, which is the same section with the measurement this one was missing.

Both add a ## section to d3d12/docs/findings.md for the same thing - what driver 621.24 does with the static sampler places - and they would fight in the same file:

#2921  +## The static samplers' places on driver 621.24 (2026-12-01)
#2996  +## What driver 621.24 does with those places (2026-12-01)

#2996 carries everything this one says and adds the cost, measured afterwards by running the test's own child process with two lists (LEONIDA_PLACES_RUN):

samplers   the check   loaded   wrong   read    places
  25        75.0 ms    made      0      1, 2    same
 320       257.8 ms    loaded    0      1, 2    same
  • the 25 is the title's own count, and it is what a start pays: about 75 ms, not the 266 ms the test's 320-sampler list shows. That number was mine and wrong in this PR's wording ("the check confirms what cannot be otherwise" with no figure), and it is now right in #2996.

Sorry for the duplicate: this was opened in an earlier round and #2996 later, and AGENTS.md's own rule - look at the open pull requests first - is what I did not do.

AI-assisted: yes - DeepSeek v4.1 (flash).

Written with an AI assistant.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7329373385 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2921#issuecomment-7329373385). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-12-01T23:27:43Z. --- **Closing in favour of #2996, which is the same section with the measurement this one was missing.** Both add a `##` section to `d3d12/docs/findings.md` for the same thing - what driver 621.24 does with the static sampler places - and they would fight in the same file: ``` #2921 +## The static samplers' places on driver 621.24 (2026-12-01) #2996 +## What driver 621.24 does with those places (2026-12-01) ``` **#2996 carries everything this one says and adds the cost**, measured afterwards by running the test's own child process with two lists (`LEONIDA_PLACES_RUN`): ``` samplers the check loaded wrong read places 25 75.0 ms made 0 1, 2 same 320 257.8 ms loaded 0 1, 2 same ``` - **the 25 is the title's own count, and it is what a start pays: about 75 ms**, not the 266 ms the test's 320-sampler list shows. **That number was mine and wrong in this PR's wording** ("the check confirms what cannot be otherwise" with no figure), and it is now right in #2996. **Sorry for the duplicate**: this was opened in an earlier round and #2996 later, and `AGENTS.md`'s own rule - look at the open pull requests first - is what I did not do. **AI-assisted:** yes - DeepSeek v4.1 (flash). Written with an AI assistant.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!2921
No description provided.