Repository navigation
check.py: count exit 77 as a skip in texture_constant_test, show the real reason in clip_test - #5922
vicennpacheco wants to merge 1 commit into
Conversation
…real reason in clip_test texture_constant_test (ps_gather_wrap, ps_gather_border, ps_array_resinfo) treated vk_texture_test's exit 77 (UNSUPPORTED) as a failure, so a device with 128 push-constant bytes reported three failures and check.py exited 1. It now returns a Skip with the tool's "unsupported: ..." line, as get_lod_test and the other helpers do. clip_test reported every exit 77 from vk_harness as "shaderClipDistance unavailable", although vk_harness also exits 77 for the push-constant limit. It now reports the tool's own "unsupported: ..." line. tests/test_shader_checks.py: UnsupportedToolReasons checks both helpers with a mocked run() (no GPU): exit 77 gives a Skip quoting the tool's line, or "unsupported device" without one, and other exit codes still fail. Both tests fail against the parent commit. Tested on an AMD Radeon Vega 8 iGPU (Ryzen 7 5825U), AMD Windows driver 31.0.21921.13001, maxPushConstantsSize 128: default settings go from "47 of 203 pass, 153 skipped" (exit 1) to "47 of 203 pass, 156 skipped" (exit 0); with LEONIDA_PC_TAIL_UBO=1 the six tests still pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested 84725d2 on AMD RADV RAPHAEL_MENDOCINO (Ryzen 9 9950X3D iGPU), subgroup 32..64: runtime/test/shaders/check.py with LEONIDA_VK_DEVICE=RADV prints "200 of 203 pass, 3 skipped" and exits 0. The skips are ms_w64x_ballot, ms_wave_info_s3 and ms_v5_workgroup ("build it with scripts/run_gpu_tests.py"). vs_clip, vs_clip_param4, vs_clip_undeclared, ps_gather_wrap, ps_gather_border and ps_array_resinfo print ok. tests/test_shader_checks.py runs 88 tests OK (the description says 84). vk_subgroup_info.py reports "max_push_constants_size": 256 on this device, so the new exit 77 paths in texture_constant_test and clip_test are not exercised here. I did not run the parent commit. AI-assisted. |
|
Thanks for testing this on the 9950X3D iGPU, @gertify! It's good to know that all six tests still print About the test count: both numbers are right; they depend on how the file is run.
All 88 pass. The +2 in each case are the new You're right that your device doesn't reach the new exit-77 paths. The unit tests cover them with a mocked AI-assisted (Claude Code). |
|
Independent CPU verification of |
|
Verified at your head on main 561b65a: test_shader_checks 84/84 (re-run) and the mechanism is right — UNSUPPORTED=77 at runtime/test/shaders/check.py:33, run() returns stdout+stderr (:624), and vk_texture_test.cpp:189 / vk_harness.cpp:378,485 print exactly the "unsupported: need N push constant bytes, device has M" line your regex quotes, so the skip now names the real device limitation instead of asserting shaderClipDistance. Flag: the branch reports no CI checks at all. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
Claimed in #5581: #5581 (comment)
What
Two small changes in
runtime/test/shaders/check.py, plus a unit test for them:texture_constant_test(ps_gather_wrap,ps_gather_border,ps_array_resinfo) now returns aSkipwhenvk_texture_testexits withUNSUPPORTED(77). It quotes the tool'sunsupported: ...line, asget_lod_testand the other helpers already do.clip_test(vs_clip,vs_clip_param4,vs_clip_undeclared) now reports theunsupported: ...line thatvk_harnessprints. Before, it always saidshaderClipDistance unavailable.Why
On a device with
maxPushConstantsSize = 128,vk_texture_testandvk_harnessexit 77 withunsupported: need 144 push constant bytes, device has 128.texture_constant_testsent that exit code tofailure(). So the three gather/resinfo fixtures were counted as failures, andcheck.pyexited 1 even though nothing failed on the GPU.clip_testlabelled every exit 77 asshaderClipDistance unavailable, even thoughvk_harnessalso exits 77 for the push-constant limit. On the device below,vulkaninforeportsshaderClipDistance = true. Runningvk_harness vs_clip.spv ps_clip_color.spv out.raw 64 64 4 4by hand prints the push-constant line. WhenshaderClipDistancereally is missing,vk_harnessprintsunsupported: shaderClipDistance, so that case is still reported correctly.How tested
Tested on an AMD Radeon Vega 8 iGPU (Ryzen 7 5825U, GCN 5 / gfx90c) with the AMD Windows driver 31.0.21921.13001 (Vulkan 1.3.260,
maxPushConstantsSize = 128) on Windows 11 build 26200. The base is561b65a. The test programs were built with llvm-mingw clang 23.1.6, llvm-mc 23.1.6 and Vulkan SDK 1.4.363.0.check.py, default settings47 of 203 pass, 153 skipped, exit 1 (3 counted as failed)47 of 203 pass, 156 skipped, exit 0vs_clip*lines, default settingsSKIP (shaderClipDistance unavailable)SKIP (unsupported: need 144 push constant bytes, device has 128)check.py,LEONIDA_PC_TAIL_UBO=1140 of 203 pass, 60 skipped140 of 203 pass, 60 skipped; the six affected tests still printokWith
LEONIDA_PC_TAIL_UBO=1, the run still exits 1 because ofps_bary,ps_persp_baryandps_ij_computed. Those failures are on the GPU and are not affected by this change; I'll report them separately (#166 entry and their own issue).Unit tests:
UnsupportedToolReasonsintests/test_shader_checks.pymocksrun(), so it needs no GPU, following check.py: mesh_v5_test quotes vk_harness's unsupported reason #4689's test formesh_v5_test. It checks three cases for both helpers: exit 77 gives aSkipthat quotes the tool'sunsupported: ...line; exit 77 with no such line givesSKIP (unsupported device); any other exit code is still a failure. Both new tests fail against the parent commit and pass with the fix. The file now runs 84 tests, all OK.python -m compileall -q runtime/test/shaders/check.py tests/test_shader_checks.pypasses.python -I:tests/test_run_gpu_tests.py(47),tests/test_gpu_unsupported_stage.py,tests/test_gpu_blocked_program.py,tests/test_gpu_build_dir.py,tests/test_runtime_paths.pyandtests/test_build_runtime_fallback.pyall pass.unittest discover -s tests/semantic, the semantic fixture tests that referencecheck.pyall pass.AI-assisted (Claude Code). I reviewed the change and ran the tests above on the GPU listed.
🤖 Generated with Claude Code