upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/scripts/run_gpu_tests.py
diff options
context:
space:
mode:
authorItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 13:15:07 -0500
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 13:15:07 -0500
commitc64494b9fe60dd87db6340f3755215de428d5b83 (patch)
treec1dd01c3412d29d569eb6ae212a9fbf267380da9 /scripts/run_gpu_tests.py
parent87f5e0dbf4cf07759989da344760e5ba12289482 (diff)
parentda3f01cee7d529b261d88a43fab92c31c622b556 (diff)
Merge pull request #2411 from TurboSosiska304
Diffstat (limited to 'scripts/run_gpu_tests.py')
-rw-r--r--scripts/run_gpu_tests.py22
1 files changed, 21 insertions, 1 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py
index b76fbf45c..f97c62c90 100644
--- a/scripts/run_gpu_tests.py
+++ b/scripts/run_gpu_tests.py
@@ -38,7 +38,7 @@ from check import TEXOFF_FALLBACK, texoff_env # LEONIDA_TEXOFF_FALLBACK=1: tex
38from check import gpu_test_timeout, timed_out # per-program time limit (LEONIDA_GPU_TEST_TIMEOUT) 38from check import gpu_test_timeout, timed_out # per-program time limit (LEONIDA_GPU_TEST_TIMEOUT)
39from check import MESH_COMPUTE, mesh_env # LEONIDA_MESH_COMPUTE=1: mesh shaders as compute + a generated VS 39from check import MESH_COMPUTE, mesh_env # LEONIDA_MESH_COMPUTE=1: mesh shaders as compute + a generated VS
40from check import (WAVE32_LANE_DUMPS, WAVE32_LANE_ENV, bitmask_perm_narrow_skip, narrow_subgroup_skip, 40from check import (WAVE32_LANE_DUMPS, WAVE32_LANE_ENV, bitmask_perm_narrow_skip, narrow_subgroup_skip,
41 vcmpx_forms_narrow_skip, wave32_lane_skip) # as in check.py 41 unpinned_subgroup_skip, vcmpx_forms_narrow_skip, wave32_lane_skip) # as in check.py
42from check import PIXEL_VERTEX, interp_f16_high_problem, ij_computed_problem, mandelbrot_problem # pixel producers and checks 42from check import PIXEL_VERTEX, interp_f16_high_problem, ij_computed_problem, mandelbrot_problem # pixel producers and checks
43from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries 43from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries
44from check import wide_pixel_skip # ps_w64x_readlane: judged only where the fragment stage was required 64-wide 44from check import wide_pixel_skip # ps_w64x_readlane: judged only where the fragment stage was required 64-wide
@@ -317,6 +317,22 @@ def dump_words(msg: str) -> list[int] | None:
317 return [int(x) for x in m.group(1).split()] if m else None 317 return [int(x) for x in m.group(1).split()] if m else None
318 318
319 319
320def subgroup_pin_skip(msg: str, cs_env: dict | None) -> Skip | None:
321 """A Skip when the runner asked for a subgroup size (VKC_SUBGROUP_SIZE) and vk_compute_test says this device
322 cannot pin it, so the dispatched words are not the ones the fixture was written for. Only for the dumps in
323 WAVE32_PIN_DUMPS: everything else the runner judges at the device's own width, which is how cs_store and the
324 cs_w32_* fixtures keep being tested on a 64-only device (check.py is conservative and skips all of them)."""
325 if cs_env and "VKC_SUBGROUP_SIZE" in cs_env:
326 return unpinned_subgroup_skip(msg)
327 return None
328
329
330# Dumps whose expected words depend on the wave width but are not lane-mask dumps (those are WAVE32_LANE_DUMPS):
331# cs_barrier_loop's trip count is 4 waves of 32, so at 64 lanes it writes a different pattern and the words would
332# report a failure that is really an unpinnable wave size (GCN3/GCN4 expose 64..64 only).
333WAVE32_PIN_DUMPS = ("cs_barrier_loop",)
334
335
320def judge_cs_dump(rc: int, msg: str, want: list[int], *, wave64: bool, partial: bool, emulated: bool, 336def judge_cs_dump(rc: int, msg: str, want: list[int], *, wave64: bool, partial: bool, emulated: bool,
321 hexwords: bool = False) -> tuple[bool | None, str]: 337 hexwords: bool = False) -> tuple[bool | None, str]:
322 """Judge one vk_compute_test "dump" run: (True, words), (False, why), or (None, why) when the device can't run it. 338 """Judge one vk_compute_test "dump" run: (True, words), (False, why), or (None, why) when the device can't run it.
@@ -1019,6 +1035,10 @@ def run_suite(a, work: str) -> int:
1019 cs_env = dict(os.environ, **WAVE32_LANE_ENV) 1035 cs_env = dict(os.environ, **WAVE32_LANE_ENV)
1020 rc, msg = run_cmd([vk_compute, spv, "1", "dump"] + (["--require-wave64"] if wave64 else []), env=cs_env) 1036 rc, msg = run_cmd([vk_compute, spv, "1", "dump"] + (["--require-wave64"] if wave64 else []), env=cs_env)
1021 skip = wave32_lane_skip(msg) if name in WAVE32_LANE_DUMPS else None 1037 skip = wave32_lane_skip(msg) if name in WAVE32_LANE_DUMPS else None
1038 if skip is None and name in WAVE32_PIN_DUMPS:
1039 # the device may not be able to run the wave size this fixture was written for (a 64-only device
1040 # can't pin 32, so cs_barrier_loop's words mean nothing); check.py skips it too
1041 skip = subgroup_pin_skip(msg, cs_env)
1022 if skip: # e.g. Mesa llvmpipe's 8-wide subgroups: these 32-lane masks can't come out right 1042 if skip: # e.g. Mesa llvmpipe's 8-wide subgroups: these 32-lane masks can't come out right
1023 ok, detail = None, str(skip) 1043 ok, detail = None, str(skip)
1024 else: 1044 else: