d3d12: run leonida-gpu's tests on one thread #2923
Closed
github-bot
wants to merge 2 commits from
github-bot/gh-2923 into main
AGit
pull from: github-bot/gh-2923
merge into: github:main
github:main
github:perf/darner-title-priority-ceiling
github:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
github:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
github:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
github:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
github:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
github:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
github:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
github:fix/runtime-test-conservative-fixtures
github:ci/shard-semantic-linux
github:docs/fg-limit-fps-switch
github:fix/runtime-test-fixture-paths
github:fix/runtime-test-fixture-readers
github:fix/read-file-hard-link
github:fix/book-slot-heap-never-read
github:fix/depth-resolve-spv-path
github:fix/indirect-unused-batched
github:gh-pr/3358/base
github:fix/xmem-refusal-diagnostics
github:gh-pr/3357/base
github:ci/shorten-ci-time
github:fix/alias-later-queued-submissions
github:claude/gallant-sagan-aamatr
github:gh-pr/3342/base
github:gh-pr/3341/base
github:d3d12/agility-sdk-621
github:gh-pr/3293/base
github:gh-pr/3319/base
github:gh-pr/3318/base
github:gh-pr/3315/base
github:gh-pr/3313/base
github:gh-pr/3314/base
github:claude/fervent-curie-m19lnr
github:gh-pr/3216/base
github:gh-pr/3272/base
github:gh-pr/3276/base
github:gh-pr/3279/base
github:gh-pr/3257/base
github:gh-pr/3258/base
github:gh-pr/3271/base
github:codex/skip-no-hit-ray-passes
github:gh-pr/3230/base
github:gh-pr/3266/base
github:gh-pr/3247/base
github:gh-pr/3246/base
github:gh-pr/3244/base
github:claude/sharp-sagan-1jqnp3
github:t3/preserve-fsr-sdk-restart-path
github:t3/propagate-host-failure-hresult
github:t3/launcher-custom-parameters
github:t3/series-x-2160-startup
github:codex/d3d12-uncapped-simulation
github:ci/less-to-run
github:perf/native-compute-shader-forms
github:claude/blissful-franklin-ukp7ag
github:codex/full-precompile-default
github:gh-pr/3166/base
github:gh-pr/3148/base
github:gh-pr/3138/base
github:gh-pr/3106/base
github:gh-pr/3057/base
github:gh-pr/2756/base
github:gh-pr/2812/base
github:gh-pr/3032/base
github:gh-pr/2992/base
github:notes/card-time-and-plant-flicker
github:gh-pr/2986/base
github:gh-pr/3000/base
github:gh-pr/2966/base
github:gh-pr/2924/base
github:gh-pr/726/base
github:gh-pr/2761/base
github:gh-pr/2663/base
github:gh-pr/2861/base
github:gh-pr/2862/base
github:gh-pr/2820/base
github:gh-pr/2811/base
github:gh-pr/2803/base
github:rt-call-trace
github:gh-pr/2802/base
github:gh-pr/2766/base
github:perf/ahead-split
github:gh-pr/2589/base
github:gh-pr/2699/base
github:gh-pr/2696/base
github:docs/readme-runtime-proposal
github:gh-pr/1346/base
github:codex/coord-claim-check-20261124-7e48
No reviewers
Labels
Clear labels
accessibility
Barrier affecting people with disabilities
area: ci
.github/ workflows and settings
area: d3d12
The D3D12 runtime in d3d12/ (Rust: leonida.exe and its crates)
area: docs
Documentation
area: launcher
The launcher (launcher/)
area: runtime (legacy)
The earlier Vulkan runtime in runtime/
area: shader translator
The shader translator (leonida-shader, tools/rdna2spirv) and its tests
area: tools
tools/ and scripts/
area: viewer
The map viewer (viewer/)
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
duplicate
This issue or pull request already exists
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
invalid
This doesn't seem right
missing claim
Needs a claim in #14
needs in-game run
Changes the code a frame runs through: needs the 300 s in-game gate (docs/game_gate.md)
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
wontfix
This will not be worked on
No labels
accessibility
area: ci
area: d3d12
area: docs
area: launcher
area: runtime (legacy)
area: shader translator
area: tools
area: viewer
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs in-game run
needs rebase
needs-triage
question
ready-for-agent
submodules
wontfix
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!2923
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2923"
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?
@fiestorra on GitHub · 2026-12-01 18:37 UTC · original
fiestorra:ci-serial-leonida-gpu→main· +45 −2 · 2 files · 2 commits · closed without mergingThe
Tests (no GPU, no game data)job fails on the runner's WARP adapter about one run in eight, on a different test each time, and this makes the crate that owns the device tests run them one at a time.What was seen, three runs of two branches, same job:
Different crates, different tests, and the branch passed an hour before. What they share is the device: the runner has no hardware GPU, so
host()returns WARP and these tests take it.Why one thread is the fix and not a guess: this crate's flake was measured and cured that way already.
The workflow ran them the default way, so every device test in the crate shared one WARP device on every core at once.
descriptor::testsallocates from the host heap and checks what it made;crash::testsmaps a page and looks at what follows it - both exactly the shape that goes wrong when two tests drive one device together.The change: the workspace runs without
leonida-gpu, and the crate runs by itself with--test-threads=1, keeping the--skip depth_bounds_pipeline_loads_and_filters_drawsthat the software adapter needs.Measured here (this machine has a card, so it says what the step costs, not that WARP is fixed):
So the job grows by seconds, not minutes, and its 30-minute timeout stays.
What I cannot show: that WARP then passes three times in a row.
gh run rerunis refused for this account and this machine has no WARP. If it still fails, the culprit is elsewhere and the job is no worse off - the change is ordering only, and no test is skipped that was not skipped before.AI-assisted: yes - DeepSeek v4.1 (flash), which matched two failures in two crates to a measurement already in this repository.
Written with an AI assistant.
@merzleckeier on GitHub · 2026-12-01 18:46 UTC · original
Independent check of the split test inventory at
d2fefa98onmain60f7dcd9. I built the original selection, both replacement selections and the diagnostics replay target for Win64 with the locked dependencies. The original 20 artifacts partition into 17 non-GPU and threeleonida-gpuartifacts with identical selected test-target features. The three GPU libtest lists match byte-for-byte, with 703 unit entries before filtering and two feature-gated integration binaries with zero tests in the default build. The separate diagnostics replay build still has one test. The depth-bounds exclusion stays on theleonida-gpucommand. The loader retains its parallel invocation.On Wine 11.22 / VKD3D-Proton 3.1.0, I also ran three focused repetitions per mode on each of RTX 4070 SUPER (620.73.4) and Radeon (RADV 26.3.1). All 12 runs (old selection with eight threads and split selection with one) returned 74 passes and the same failure,
watch::tests::what_is_left_alone_is_no_known_hole. It also failed alone in each RTX binary. That is a stable result on this setup. The no-ICD full GPU runs and the separate diagnostics replay did not complete under Wine. Native Windows WARP flake incidence remains unmeasured here.MEASURED with synthetic or unit test inputs. AI-assisted (Codex).
@Neutron-0 on GitHub · 2026-12-01 19:00 UTC · original
Verified on Windows 11, Rust 1.98.1, no GPU and no game files.
The claim holds, on the pull request's own base. The whole
leonida-gputest binary was run ten times in parallel and six times with--test-threads=1, on the same commit (60f7dcd90, which is onmain):--test-threads=1, as this pull request runs itBoth parallel failures were the same test:
which is the pool race #2854 fixes. Running the crate's tests one at a time removes it here, so the mechanism the pull request relies on - the device tests of one crate sharing one device - is the right one, and the cost of the extra step (the pull request measures 55 s for the whole crate serial) is what it says.
Two details of the diff that are right and worth stating. The workspace step drops
--skip depth_bounds_pipeline_loads_and_filters_draws, and that is safe: the test with that name exists only ind3d12/crates/leonida-gpu/src/pipeline/host.rs, and the step now excludesleonida-gpu, so nothing that needed the skip is left in it - and the new step keeps the skip for the crate that has the test. The separateReplay test (diagnostics)step still runs in parallel, and that is fine:d3d12/crates/leonida-gpu/tests/replay.rshas exactly one#[test], so there is nothing in it to run in parallel. The workflow file parses, and the job list is unchanged (d3d12).actionlintis not on this machine, so the repository's ownjactionlintworkflow is what would check the file's style.One thing to be clear about, because it decides what happens to #2854 and #2884. This pull request makes the job green by changing the schedule of the tests, and at least two of the races it hides are in product code, not in the tests:
Reclaim::releaseincrates/leonida-gpu/src/pool.rsleaving the released resource's raw pointer inRECENT/UNSEEN, so a pointer that the driver hands out again is reported as fresh - that is the pool's release path, and #2854 fixes it;crates/leonida-gpu/src/watch.rs:6010and:5343) are the guard state still listing a block after a view's address has gone back to Windows - also product code;crates/leonida-gpu/src/timeline/record.rs.Serializing the tests does not repair any of those; it only stops the tests from seeing them. So this pull request and #2854 and #2884 are complementary rather than alternatives: this one makes the job green now, and those two remove the defect that a program with two threads would still meet. It would be a mistake to read this pull request as "the races are only in the tests" and close the other two on that basis.
What cannot be shown here either. The pull request says it cannot show that the runner's WARP then passes three times in a row, and neither can this box: the runs above are on this machine's own card, with WARP not involved, so they show that the schedule removes the parallel failures here and not that the runner's software adapter is fixed. The serial runs take about a minute each on this machine, well inside the 30-minute timeout of the new step.
Not checked: the
D3D12 runtimejob's own steps (a GPU runner); the workflow's behaviour whenleonida-gpufails to build (the new step would report it separately from the workspace step).@Kal0s-design on GitHub · 2026-12-01 19:03 UTC · original
Measured on Windows with the WARP adapter, since the description says this machine has none. I forced WARP with
LEONIDA_D3D12_WARP=1, which only takes effect in adiagnosticsbuild.Setup:
maind2a564b66,leonida-gpulib tests built with--features diagnostics,--skip depth_bounds_pipeline_loads_and_filters_drawsas in the workflow. Every run is a fresh process.--test-threads=4(awindows-latestrunner's core count)--test-threads=1(this PR)--exactThe one failure was
texture::alias_cast_tests::committed_and_placed_r32_uint_textures_cast_to_r9g9b9e5_under_legacy_barriers. That is the same test MoonEyes saw failing in 2 of 5 parallel runs of plainmain(on #2852, on a card). So the shape the description gives holds here too: parallel runs on one device fail now and then, on a test that passes alone, and serial runs are clean. Two caveats:diagnosticsbuild, the only way to force WARP on a machine with a card. The workflow step builds without it.On cost: serial is about 2x the 4-thread time here (32 s against 16 s for the lib tests). That is consistent with the 37 s against 13 s in the description, and well inside the 30-minute timeout.
GPUs tested: WARP (forced); the same build on the card is not part of these numbers.
AI-assisted: yes (Claude Code).
@fiestorra on GitHub · 2026-12-01 19:07 UTC · original
The job this changes is the job that ran it, and it passed.
d3d12 (windows-latest)is green on this branch, and that run took the new path: the workspace withoutleonida-gpu, then the crate alone with--test-threads=1.jactionlintis green as well, so the YAML is what it looks like.That is one clean run, not the three I said would settle it, and I would still like the three. But it is the first time the job has passed without a device test failing on WARP in four attempts, and the four before it are listed in the description.
What to watch when it lands: the step time. The run here is the same shape as the ones that failed, so the durations are comparable - if the
Tests (leonida-gpu, one thread)step shows about a minute more than the workspace step it replaced, the cost is what the description measured.Written with an AI assistant.
@KelboLive on GitHub · 2026-12-01 19:08 UTC · original · reviewed
Measured on this box (32 threads, RTX 4070 Ti SUPER, 621.01, native Windows):
cargo test -p leonida-gpu --lib -- --skip depth_bounds…failed 6 of 10 parallel runs — 5×texture::alias_cast_tests::…under_legacy_barriersattexture.rs:5664(stalepool::fresh, the production bug #2854 fixes) and 1×watch::tests::what_the_kernel_writes_through_is_not_guarded_for_another_viewatwatch.rs:6010. Serial is 632/632 at 34–36 s against 11–13 s parallel, so the split is cheap (+35–40 s on a 9-minute job) and it does stabilise this job.But it is ordering, not a cure, and two claims do not hold:
cargo testis still parallel, and #2854's descriptorTEST_SYNC_LOCKis still needed because the 4 msleonida-heap-syncproducer thread is independent of test threads. So #2854/#2896 are complementary, not redundant; #2884 is orthogonal (CI never runs the diagnostics lib suite here).crash::testsfailure has no GPU dependency (crates/leonida-loaderdoes not depend onleonida-gpu;crash.rs:890-921isVirtualAlloc/memory_at), and it stays parallel in the first step (d3d12.yml:76). The "shared WARP device" cause does not cover it, so one of the two motivating failures is untouched by this change.Also: this branch contains #2921's findings commit (
a012d951is #2921's head), so merging #2923 would land that unrelated section — and that section has a blocking problem in its own review (the graphics pipeline still slides on 621.x). Please rebase off it.Minor: the comment at
d3d12.yml:72-73is now stale (the--skipmoved to the next step andleonida-gpuis no longer in that command), and the title reads like a fix rather than a mitigation — "run … on one thread" could say "to stop the parallel flakes".Merge is mechanically clean and all checks pass.
@merzleckeier on GitHub · 2026-12-01 21:12 UTC · original
Serial workflow and GPU skip output together at
d2fefa98with #2908 (42957b26) on1fff69129. I used the exact GPU step’s default features, one-thread libtest setting and depth-bounds exclusion in a local Wine 11.22 check. Without an adapter, default capture hid both of the new skip messages in all three focused repeats. Appending--show-outputdisplayed the two messages in every repeat, while the result still said three passed and zero ignored.--nocapturedisplayed them too.For the full libtest runs without an adapter I switched to Wine’s built-in DXGI/D3D12 after the bundled DXVK path faulted in pre-existing fixtures. Both trees returned 640 passed, three matching watch failures, 59 ignored and one filtered. Default capture showed zero generic no-adapter markers on either tree.
--show-outputshowed 1 on main and 47 with #2908. The split serial job still uses default capture, so the #2908 diagnostics remain hidden there in this setup.Separately, a three-test hardware subset covering descriptor sync, alias cast and the kernel-write watch test passed in all 24 starts across main/#2854, RTX 4070 SUPER/RADV, and one/eight test threads. This was a targeted sample under Wine. Native Windows CI/WARP flakiness was outside the run.
MEASURED with OpenAI Codex and a separate read-only review.
@MoonEyes on GitHub · 2026-12-02 12:19 UTC · original
Closing: this pull request no longer applies to current
main(merge conflict in.github/workflows/d3d12.yml), and open pull requests that have fallen out of step withmainare being closed so the list stays workable. If you still want this change, rebase it on currentmainand reopen it (or open a new pull request); it will be looked at again.AI-assisted (Claude Code).
Pull request closed