GPU fixture for the packed integer dot products (cs_w32_dot_int) #59
Closed
leonida/mandy
Andretuta wants to merge 0 commits from
old-pr/9781 into main
pull from: old-pr/9781
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!59
Loading…
Reference in a new issue
No description provided.
Delete branch "old-pr/9781"
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/ItsNotRexed/Leonida/issues/9522#issuecomment-7114878745 (new TEST item)
Re-submission of
#9672, which was closed in the PR cleanup. It builds on#7237by@xelerb-debug(also closed in the cleanup): that PR's two commits, the; mcpu:fixture header and itscs_global_csubfixture, are included here unchanged and keep@xelerb-debugas their author; this PR's own change is the last commit. If#7237is re-opened and merged first, this reduces to that last commit.What and why
docs/design.md's "Packed integer dot products" row is CPU-checked (tests/semantic) and measured withtools/hw_oracle, but no checked-in fixture runs the translation ofv_dot2_i32_i16,v_dot2_u32_u16,v_dot4_u32_u8,v_dot8_i32_i4orv_dot8_u32_u4on a GPU.runtime/test/shaders/cs_w32_dot_int.asmis a wave32 dump likecs_w32_new_ops/cs_w32_dot2_f16: lane 0 stores eight words, each derived in the file header from the row's rule (element products + S2, sign- or zero-extended elements, 32-bit wrap;clampsaturates the exact sum):v_dot2_i32_i160x0003fffe, 0x0005fff9, 100v_dot2_u32_u160xffff8001, 0xffff0003, 0xffffff000xffff7f04v_dot4_u32_u80x80ff0102, 0x7f02ff03, 5v_dot8_i32_i40x8f01f7a3, 0x12345678, -3v_dot8_u32_u47v_dot2_u32_u16 … clamp0xffffffff0xffffffffv_dot2_i32_i16 … clamp0x80008000twice,-20x7ffffffe: the products overflow, the sum does not, so no saturationv_dot2_i32_i16 … clamp0x80008000twice,00x7fffffffOut 1 and 3/4 use the same bits signed and unsigned, so a signedness mix-up changes a word; out 6 vs 7 checks that clamp saturates the exact sum, not a wrapped one.
Registered in
check.py(WAVE32_DUMPS+ expected words) andrun_gpu_tests.py(the three wave32 lists). The design row gets one sentence. The VOP2v_dot*c_*forms don't assemble with llvm-mc for gfx1013 or gfx1030, so they stay CPU-checked; the sentence says so.Tested
Windows 11, NVIDIA GeForce RTX 3070 (Ampere), driver 621.01, MSVC 19.44 (VS 2022 Build Tools), Vulkan SDK 1.4.363.1, llvm-mc 23.1.6 (conda-forge, AMDGPU), Python 3.12.10, on this branch (rebased onto
main2d53a8055):run_gpu_tests.py --filter cs_w32_dot: translated +spirv-val, PASS:129 4294934276 17032 4294967258 260 4294967295 2147483646 2147483647, all eight as derived.build.py+check.py:cs_w32_dot_int ok,cs_global_csub ok(#7237's fixture, still passing after the rebase).tests/test_rdna2_decode.pywithLLVM_MCset: the llvm-mc parity check passes on both new fixtures; it later fails oncs_w32_permlane_fi.asmandps_w64_a_discard.asm, exactly as onmain(#8044covers the permlane one).tests/test_run_gpu_tests.py,tests/test_runner_calls_all_tests.py,tests/test_rdna2_decode.py,tests/test_design_contract_rows.py,tests/test_docs_links.py,tests/test_docs_repo_paths.py: OK.tests/test_shader_checks.pyhas the same 15 failures with and without this change (the onesmainalready has,#7122).scripts/check_no_game_data.pyon the new fixture anddocs/design.md: clean.AMD:
@ThomasSAMPran it on an RX 9070 XT (RDNA4, Windows): the same eight words, plus a negative control (a zero-extendedv_dot8_i32_i4changes only out[3]); see the comments. An RDNA2 run is still open.AI-assisted: yes (Claude).
🤖 Generated with Claude Code
macOS arm64 verification (Apple M3 Pro) — both new fixtures pass on MoltenVK and KosmicKrisp, the suites do not move, and one list is short an entry
Head
d24ef7559, merge-base2d53a8055; merged onto currentmain(9ec34cdff) as2de4fd054with no conflicts. Everything below is that merged tree. 8 files +274/−28. Host: macOS 27.2.1, Apple M3 Pro (arm64, subgroup 4..32), CPython 3.15.2, llvm-mc 23.1.5 (AMDGPU), Apple clang 21.0.0, MoltenVK 1.4.0, KosmicKrisp (Mesa 26.3.0).2de4fd054main9ec34cdffscripts/run_semantic_tests.py tests/semantictest_exec_computed,test_image_atomics_guardrun_gpu_tests.py, all cases, MoltenVKrun_gpu_tests.py, all cases, KosmicKrispAfter normalising the temporary work paths, the diff of every
PASS/FAIL/SKIPline against themainrun is exactly the two new lines, on both drivers:So 250 = 248 + 2, +2 passed on each driver, no fixture changed verdict, value or skip reason.
spirv-val: 259 shaders, 258 translated, 258 valid (theps_ij_computedcount is the known--f16-interp-fallbackskip, as onmain).python -I scripts/check_no_game_data.pyon all eight changed files: clean.The words are right, not just stable. I re-derived all eight
cs_w32_dot_intwords from the .asm header by hand and they match what both GPUs returned: 129;0xFFFF7F04(32769·3 + 65535² + 0xFFFFFF00 wraps once); 17032;0xFFFFFFDA(−35 − 3, the element-wise nibble pairing, not a permutation — I checked that the natural order gives −35); 260;0xFFFFFFFF(u32 clamp);0x7FFFFFFE(2·32768² − 2: the products overflow, the sum fits);0x7FFFFFFF(2³¹ saturates). Likewise all eightcs_global_csubwords:0x10070905,0x0D070000,0x00630064,0x80000000,0,0xFFFFFFFE(unsigned compare),0x000C0500(12 lanes got 0),0x01D800D2(old values sum 210, 472 left on the no-glcdword).Three negative controls, on the GPU through the translator (each sabotage applied to
tools/rdna2spirv.py, fixture run, file restored):OpISubin place of theOpSelect):FAIL cs_global_csub 0x10070905 0xfffffffe …— the wrapping dword shows;OpSGreaterThanforOpUGreaterThan):FAIL cs_global_csub … 0x0 …— out[5], case E, is exactly the word the design row says catches it;i4dot as unsigned (op.endswith(("i16",))):FAIL cs_w32_dot_int … 250 …— out[3] instead of0xFFFFFFDA.So both fixtures bite on real hardware, and the design row's "with the clamp removed, or with a signed compare, fails it" is now measured on a second driver stack, not only asserted.
The
; mcpu:plumbing is necessary and works. llvm-mc 23.1.5 rejectsglobal_atomic_csuband all five dot ops for gfx1013 ("instruction not supported on this GPU") and encodes them for gfx1030, so the header line is the only way these fixtures can be assembled at all. build.py,run_gpu_tests.pyandtests/conftest.pyeach grew their own reader for it;tests/test_rdna2_decode.pyreads it withre.Mover the whole file rather than the leading comments. Three copies of the same rule that must agree is a drift hazard — one helper inruntime/test/shaders/(ortools/mc_command.py, which the runner already imports) would be cheaper than three.One real (small) gap.
cs_global_csubis added tocheck.py'sGLOBAL_OFFSET(runtime/test/shaders/check.py:343) but not toWAVE32_DUMPS(:106-107), so:1827runs it withrequire_wave64=True. Measured here:The fixture declares
; mattr: +wavefrontsize32,-wavefrontsize64and runs unmodified on a 32-wide subgroup, socheck.pyshould not ask for 64 for it.cs_w32_dot_intwas added toWAVE32_DUMPSin this PR;cs_global_csubwas missed. One word on line 107 fixes it, and it matters becausecheck.pyis the harnesstools/progress_dashboard.pyreads.For the design row: it currently names an RTX 4060 / RTX 3070. Both fixtures also pass on Apple M3 Pro through MoltenVK 1.4.0 and KosmicKrisp (Mesa 26.3.0) with the words above, if you want the row to say so.
No game files. AI-assisted.
The csub part of this PR is now in #411, which carries
xelerb-debug's two commits unchanged:cs_global_csuband the; mcpu:header. #411 also adds a second fixture,cs_w32_csub_ext(inactive lanes on a trap word, buffer elements past the V# range), and runs on an RTX 4070 Ti and a Radeon 610M (gfx1036). Once #411 lands, this PR reduces to itscs_w32_dot_intcommit.Tested
d24ef7559merged ontomain57ba40bd6, native Windows 11 Pro 26H2 (build 26300), NVIDIA GeForce RTX 4060 (subgroup 32), driver 621.14, VS 2022 RelWithDebInfo + Ninja, llvm-mc 21.1.8.It no longer merges cleanly:
scripts/run_gpu_tests.pyconflicts withmain'sTEXT_ONLY_MARKtext-only path inassemble_to_sand with the compute name list. For the test I kept both: the text-only early return, then this PR'sasm_target(), and"cs_w32_dot_int"added tomain's list.main209/263, 53 skipped. The only difference in the PASS/FAIL/SKIP lines is the two new ones:PASS cs_global_csub 0x10070905 0xd070000 0x630064 0x80000000 0x0 0xfffffffe 0xc0500 0x1d800d2PASS cs_w32_dot_int 129 4294934276 17032 4294967258 260 4294967295 2147483646 2147483647LEONIDA_W64_EMULATE=1and underLEONIDA_VK_VALIDATION=1 VK_KHRONOS_VALIDATION_GPUAV_ENABLE=1(0 VUIDs).cs_imgatomic_ext, is the same onmain.AI-assisted testing (non-developer tester).
Maintainer review: not ready to merge. The PR is still a draft, conflicts with current main and its current CI was cancelled. The
cs_global_csubportion overlaps #411, which remains open/conflicting; please reduce this PR to the distinct dot fixture once the csub work is carried by #411, or clarify the intended ownership. The independent review also found the csub fixture missing fromWAVE32_DUMPS, making the harness skip it on subgroup-32 devices. Resolve that coverage issue, update against main, then rerun current focused/full validation before requesting merge.Draft PR review note: this carried-over PR currently conflicts with
main(indocs/design.md,runtime/test/shaders/check.py, andscripts/run_gpu_tests.py), its CI was cancelled, and itscs_global_csubcommits overlap open PR#411. Please coordinate with#411(reducing this PR to the distinctcs_w32_dot_intfixture), rebase onto currentmain, mark ready, and run fresh CI.(AI-assisted review.)
Marking Ready for Review since no WIP/blocker reason for draft status is specified on this PR, so it can enter normal CI and review.
(AI-assisted triage.)
Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (
d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools,d3d12/, or general docs), please feel free to reopen it.