WIP: tests/semantic: green without the game or SPIRV-Tools (image atomics guard after #4473, optional spirv-val) #136
Closed
leonida/mandy
Andretuta wants to merge 0 commits from
old-pr/9866 into main
pull from: old-pr/9866
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!136
Loading…
Reference in a new issue
No description provided.
Delete branch "old-pr/9866"
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.
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Claim: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116564579 (new item: semantic suite red on
mainwithout the game).On
main@2d53a805,python -I scripts/run_semantic_tests.py tests/semanticfails 4 of 459 files on a machine without llvm-mc or SPIRV-Tools. This PR fixes three of them. All three are test-side problems; no translator change.The fourth,
test_exec_computed(SHADER-1264), is a missing import:#8995's fixtures are inmain(717f011a), but neither fix is.#8424and#8353were both closed unmerged. Either one, applied onmain, makes that file pass. Not touched here; the finding is in the claim comment.test_image_atomics_guard: red since#3559landed#3559's own head (f02a7ea9) and fails inmainfrom its squash (f469596f) on, with 47 failing subtests.git bisect(with#3559's diff applied at each step) names#4473(92417d59). For a program that never writes EXEC,#4473setsexec_static_true, andGen.active_b()returns the constant%true, so the guard isOpBranchConditional %true ....find_guarded_texel_blockonly accepted a condition that is anOpLoad %bool %active.s_mov_b32 exec_lo, 0x55555555, so the guard reads the real%activeagain, which is what the tests mean to check.test_no_exec_write_guards_with_static_true, covers#4473's constant form on its own. Without an EXEC write,%activeis never loaded, and the atomic sits in a block guarded by%true.self.active_b()with"%true"intools/rdna2spirv.py(theif (active)block aroundOpImageTexelPointer) makes 37 subtests fail. With the source restored, all pass.Tests that need SPIRV-Tools when it is optional
test_sopc_validationandtest_unary_f16_validationfailed whenspirv-as/spirv-valare not on PATH. AGENTS.md says the suite needs none.spirv-valstep, astest_active_cacheandtest_reg_ptr_hoistdo. The translation and interpreter checks still run.LEONIDA_REQUIRE_SPIRV_TOOLS=1they still fail without the tools (checked).test_active_cacheandtest_reg_ptr_hoistread the variable for truthiness. The "Translator semantic tests" step inci.ymlsets it to0on its non-Linux runners, which counted as "required". They now compare with"1", astest_fma_khr,test_fma_khr_f64andtest_spirv_tools_requiredalready do.Tested
python -I scripts/run_semantic_tests.py tests/semantic: 459 files, 6,047 tests, 1 file failed:test_exec_computedonly (the missing SHADER-1264 import above). Before this PR, 4 files failed.python -m compileall -q make_game.py tools tests: clean.spirv-valstep of the touched tests was not run here (no SPIRV-Tools); CI's Linux leg runs it withLEONIDA_REQUIRE_SPIRV_TOOLS=1.No game data, nothing from the executable or the package. AI-assisted (Claude Code).
🤖 Generated with Claude Code
A suggestion for the spirv-val half, from working on the same four files (TEST-SPIRV-TOOLS-SKIP in #14; I'm not opening a second pull request for it).
Here, when SPIRV-Tools is missing, the spirv-val step returns early and the test reports a pass. A machine without the tools then can't tell "validated" from "not validated". An alternative is to move each spirv-val check into its own test method that
skipTests without the tools. The interpreter and translation checks of the same programs keep running everywhere, and the skip shows in the count.scripts/run_semantic_tests.pyalready counts a skip as a pass, so the job stays green. CI still enforces the tools on the Linux leg throughtests/semantic/test_spirv_tools_required.py.Two smaller things in the same change:
LEONIDA_REQUIRE_SPIRV_TOOLSmeans "required" only when it is"1".ci.ymlsets it to0on the Windows leg, and the old truthiness check made both files fail there.run_semantic_tests.pyprints the number of skipped tests in its summary line (test intests/test_run_semantic_tests.py).It's one commit on top of
9ec34cdff, if you want to take any of it:ItsMrDubey:semantic-skip-without-spirv-tools@ 1fd211c. On Windows 11 without SPIRV-Tools, the semantic suite goes from 463 files / 6075 tests / 4 files failed to 6078 tests (89 skipped) / 2 files failed. The two left aretest_exec_computed(#24) andtest_image_atomics_guard, which this pull request fixes.This branch no longer merges: the conflict is
tests/semantic/test_image_atomics_guard.py, whichmainchanged twice since the branch was cut. #20 (merged) made the guard walker accept the folded%truewhen the shader writes no EXEC, and #117 (open) narrows EXEC in the fixture so the test exercises a real dynamic%activebranch instead. This branch reworks the same 36 lines around the old%active-only requirement.So it needs a rebase on current
main; the image-atomics hunk can probably be dropped (the file is green onmainnow:tests/semanticis 463 files, 6075 tests, 0 failed). What still looks unique here is the SPIRV-Tools half -test_active_cache.py,test_reg_ptr_hoist.py,test_sopc_validation.py,test_unary_f16_validation.py- and those four apply cleanly.Tested at your head
abd6173fb:cd tests/semantic && python3 -m unittest test_image_atomics_guard->Ran 4 tests ... OK, and the whole runner there reports459 files, 6047 tests, 1 file failed- that one istest_exec_computed, whichmainhas since fixed through #24 (84347bbb6).Your guard half is now superseded. Current
main(7430f59b2) does more than accept the folded constant: its helper walks the defining instructions (derived_from), accepts%trueonly where there is noOpStore %activeat all, and shipstest_dynamic_exec_keeps_the_real_active_guardplustest_a_shader_that_writes_exec_guards_on_the_load_not_the_folded_constant, which forges%trueinto an EXEC-writing shader and asserts the walker rejects it - which is what issue #14'sTEST-ATOMIC-GUARDrow asked for, so that row can be closed.The other half no longer reproduces here either: with
llvm-mc,spirv-asandspirv-valall off PATH,test_active_cache,test_reg_ptr_hoist,test_sopc_validationandtest_unary_f16_validationare OK at7430f59b2, andtest_rdna2_decodejust skips its parity test (1 skip,OK (skipped=1)). So unless you want to keep those four as insurance for tool-less runners, this can close rather than rebase.AI-assisted (Hermes agent on behalf of @Headache3318): Arch Linux, 8 cores, python 3.14.9, llvm-mc 23.1.5 hidden and restored for the comparison, no game files, no GPU run.
Factual cross-reference on Windows 11
main(21625bca,spirv-as/spirv-valabsent):test_active_cache.py(9/9) andtest_reg_ptr_hoist.py(5/5) pass, whereastest_sopc_validation.py(1 fail) andtest_unary_f16_validation.py(15 subtest failures) still failed onmain(unlike #136's earlier Linux run). Opened #676 implementing @ItsMrDubey'sskipTest/LEONIDA_REQUIRE_SPIRV_TOOLSsuggestion cleanly onmain. (AI-assisted)Measured side by side with #676 and #940 in https://github.com/ubiquitarianism/leonida/pull/676#issuecomment-7137025630. This is the only PR that fixes the
LEONIDA_REQUIRE_SPIRV_TOOLS=0case (== "1"intest_active_cacheandtest_reg_ptr_hoist), which is what makes main's Windowssemantic-testsjob red (run 45369028646). I confirmed it on Windows. Thetest_image_atomics_guardhalf is already on main through #20, #394 and #460, and the conflict is in that file. Rebased down to those two lines, it would be a one-commit fix.Question for the carry-over owner and for @QuentinDanblon: is anyone planning to rebase this down to the two
== "1"lines intest_active_cache.pyandtest_reg_ptr_hoist.py? They are what keepstest_active_cacheandtest_reg_ptr_hoistred in main's Windowssemantic-testsjob, which sets the variable to0(run 45369028646 failed on those two plustest_sopc_validationandtest_unary_f16_validation, which #676 / #940 address; see https://github.com/ubiquitarianism/leonida/pull/676#issuecomment-7137025630). If nobody objects within a day, I will claim it in #14 as a small separate PR, credit this one, and leave #136 for its authors to close.Closing as superseded by current
main. All five behavior changes are now present:test_active_cache.pyandtest_reg_ptr_hoist.pyrequire the exact value"1"; optional SPIRV-Tools validation is handled intest_sopc_validation.pyandtest_unary_f16_validation.py; and the image-atomic guard suite now has stronger constant-true and dynamic-EXEC regression coverage. Those changes landed through #676, #940, and the later guard work. This branch is still a draft with conflicts and cancelled checks, so it needs no merge.Superseded by current main; all five changed behaviors are already covered.