diff options
| author | TurboSosiska304 <cirillaizvengerberga@proton.me> | 2026-11-22 19:54:22 +0300 |
|---|---|---|
| committer | TurboSosiska304 <cirillaizvengerberga@proton.me> | 2026-11-22 19:54:22 +0300 |
| commit | da3f01cee7d529b261d88a43fab92c31c622b556 (patch) | |
| tree | d7179ddf0180b48928ba35f357c111a5ce2341f2 /scripts/run_gpu_tests.py | |
| parent | 49475796c226c8511b9470bf97a4daf57b8af323 (diff) | |
gpu tests: skip a fixture whose wave size the device cannot pin
cs_barrier_loop is a wave32 fixture (subgroup_size 32 in index.json): its
expected words are four waves of 32 lanes. run_gpu_tests.py pinned the size
through VKC_SUBGROUP_SIZE but, unlike check.py, judged the dump when
vk_compute_test reported "compute subgroup size: 32 not available" and ran it
at 64 lanes anyway. A device with 64..64 compute subgroups (GCN3/GCN4 on RADV)
therefore reported a failure that is really an unpinnable wave size: 139/180
passed with 1 failed, where check.py reported 0 failed on the same work folder.
Reuse check.py's unpinned_subgroup_skip for cs_barrier_loop only. The other
pinned dumps are still judged at the device's own width, which is how cs_store
and the cs_w32_* fixtures keep being tested on a 64-only device (skipping all
of them cost 12 passes: 128/180).
RX 570 (gfx803, RADV Mesa 26.2.6, Vulkan 1.4.354), commit 4947579:
run_gpu_tests 139/180 passed, 41 skipped, 0 failed; check.py 0 failed.
Diffstat (limited to 'scripts/run_gpu_tests.py')
| -rw-r--r-- | scripts/run_gpu_tests.py | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py index 698ec36d0..3ccf0d3f9 100644 --- a/scripts/run_gpu_tests.py +++ b/scripts/run_gpu_tests.py | |||
| @@ -37,7 +37,7 @@ from check import TEXOFF_FALLBACK, texoff_env # LEONIDA_TEXOFF_FALLBACK=1: tex | |||
| 37 | from check import gpu_test_timeout, timed_out # per-program time limit (LEONIDA_GPU_TEST_TIMEOUT) | 37 | from check import gpu_test_timeout, timed_out # per-program time limit (LEONIDA_GPU_TEST_TIMEOUT) |
| 38 | from check import MESH_COMPUTE, mesh_env # LEONIDA_MESH_COMPUTE=1: mesh shaders as compute + a generated VS | 38 | from check import MESH_COMPUTE, mesh_env # LEONIDA_MESH_COMPUTE=1: mesh shaders as compute + a generated VS |
| 39 | from check import (WAVE32_LANE_DUMPS, WAVE32_LANE_ENV, bitmask_perm_narrow_skip, narrow_subgroup_skip, | 39 | from check import (WAVE32_LANE_DUMPS, WAVE32_LANE_ENV, bitmask_perm_narrow_skip, narrow_subgroup_skip, |
| 40 | vcmpx_forms_narrow_skip, wave32_lane_skip) # as in check.py | 40 | unpinned_subgroup_skip, vcmpx_forms_narrow_skip, wave32_lane_skip) # as in check.py |
| 41 | from check import PIXEL_VERTEX, interp_f16_high_problem, ij_computed_problem, mandelbrot_problem # pixel producers and checks | 41 | from check import PIXEL_VERTEX, interp_f16_high_problem, ij_computed_problem, mandelbrot_problem # pixel producers and checks |
| 42 | from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries | 42 | from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries |
| 43 | from check import wide_pixel_skip # ps_w64x_readlane: judged only where the fragment stage was required 64-wide | 43 | from check import wide_pixel_skip # ps_w64x_readlane: judged only where the fragment stage was required 64-wide |
| @@ -310,6 +310,22 @@ def dump_words(msg: str) -> list[int] | None: | |||
| 310 | return [int(x) for x in m.group(1).split()] if m else None | 310 | return [int(x) for x in m.group(1).split()] if m else None |
| 311 | 311 | ||
| 312 | 312 | ||
| 313 | def subgroup_pin_skip(msg: str, cs_env: dict | None) -> Skip | None: | ||
| 314 | """A Skip when the runner asked for a subgroup size (VKC_SUBGROUP_SIZE) and vk_compute_test says this device | ||
| 315 | cannot pin it, so the dispatched words are not the ones the fixture was written for. Only for the dumps in | ||
| 316 | WAVE32_PIN_DUMPS: everything else the runner judges at the device's own width, which is how cs_store and the | ||
| 317 | cs_w32_* fixtures keep being tested on a 64-only device (check.py is conservative and skips all of them).""" | ||
| 318 | if cs_env and "VKC_SUBGROUP_SIZE" in cs_env: | ||
| 319 | return unpinned_subgroup_skip(msg) | ||
| 320 | return None | ||
| 321 | |||
| 322 | |||
| 323 | # Dumps whose expected words depend on the wave width but are not lane-mask dumps (those are WAVE32_LANE_DUMPS): | ||
| 324 | # cs_barrier_loop's trip count is 4 waves of 32, so at 64 lanes it writes a different pattern and the words would | ||
| 325 | # report a failure that is really an unpinnable wave size (GCN3/GCN4 expose 64..64 only). | ||
| 326 | WAVE32_PIN_DUMPS = ("cs_barrier_loop",) | ||
| 327 | |||
| 328 | |||
| 313 | def judge_cs_dump(rc: int, msg: str, want: list[int], *, wave64: bool, partial: bool, emulated: bool, | 329 | def judge_cs_dump(rc: int, msg: str, want: list[int], *, wave64: bool, partial: bool, emulated: bool, |
| 314 | hexwords: bool = False) -> tuple[bool | None, str]: | 330 | hexwords: bool = False) -> tuple[bool | None, str]: |
| 315 | """Judge one vk_compute_test "dump" run: (True, words), (False, why), or (None, why) when the device can't run it. | 331 | """Judge one vk_compute_test "dump" run: (True, words), (False, why), or (None, why) when the device can't run it. |
| @@ -989,6 +1005,10 @@ def run_suite(a, work: str) -> int: | |||
| 989 | cs_env = dict(os.environ, **WAVE32_LANE_ENV) | 1005 | cs_env = dict(os.environ, **WAVE32_LANE_ENV) |
| 990 | rc, msg = run_cmd([vk_compute, spv, "1", "dump"] + (["--require-wave64"] if wave64 else []), env=cs_env) | 1006 | rc, msg = run_cmd([vk_compute, spv, "1", "dump"] + (["--require-wave64"] if wave64 else []), env=cs_env) |
| 991 | skip = wave32_lane_skip(msg) if name in WAVE32_LANE_DUMPS else None | 1007 | skip = wave32_lane_skip(msg) if name in WAVE32_LANE_DUMPS else None |
| 1008 | if skip is None and name in WAVE32_PIN_DUMPS: | ||
| 1009 | # the device may not be able to run the wave size this fixture was written for (a 64-only device | ||
| 1010 | # can't pin 32, so cs_barrier_loop's words mean nothing); check.py skips it too | ||
| 1011 | skip = subgroup_pin_skip(msg, cs_env) | ||
| 992 | if skip: # e.g. Mesa llvmpipe's 8-wide subgroups: these 32-lane masks can't come out right | 1012 | if skip: # e.g. Mesa llvmpipe's 8-wide subgroups: these 32-lane masks can't come out right |
| 993 | ok, detail = None, str(skip) | 1013 | ok, detail = None, str(skip) |
| 994 | else: | 1014 | else: |