d3d12: run leonida-gpu's tests on one thread #2923
Closed
leonida/mandy
fiestorra wants to merge 0 commits from
ci-serial-leonida-gpu into main
pull from: ci-serial-leonida-gpu
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
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
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!2923
Loading…
Reference in a new issue
No description provided.
Delete branch "ci-serial-leonida-gpu"
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?
Pull request closed
This pull request cannot be reopened because the branch was deleted.
The
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.
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).
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).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).
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.
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.
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).