diff options
| author | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-21 16:08:48 -0500 |
|---|---|---|
| committer | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-21 16:08:48 -0500 |
| commit | f3da088e5611be96dd0c356d63dd8b07e37a31df (patch) | |
| tree | 1c8ba25067aaca2b9364b97dca46cfc99bdcabd0 /scripts/run_gpu_tests.py | |
| parent | b36252415a939e94d028b65a03eab8d883001315 (diff) | |
| parent | 49dd92d41d9b68845e700fcd750b87e9f276012a (diff) | |
Merge pull request #171 from shelbykb2
# Conflicts:
# runtime/test/shaders/check.py
# scripts/run_gpu_tests.py
# tests/test_shader_checks.py
Diffstat (limited to 'scripts/run_gpu_tests.py')
| -rw-r--r-- | scripts/run_gpu_tests.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py index d73b75e0d..a811dea15 100644 --- a/scripts/run_gpu_tests.py +++ b/scripts/run_gpu_tests.py | |||
| @@ -482,12 +482,15 @@ def run_suite(a, work: str) -> int: | |||
| 482 | results.append((name, False, "64-wide subgroup was not confirmed (rebuild vk_compute_test)")) | 482 | results.append((name, False, "64-wide subgroup was not confirmed (rebuild vk_compute_test)")) |
| 483 | else: | 483 | else: |
| 484 | results.append((name, rc == 0, msg.splitlines()[-1] if msg else "")) | 484 | results.append((name, rc == 0, msg.splitlines()[-1] if msg else "")) |
| 485 | elif name in ("cs_store", "cs_wave64_ballot", "cs_wm_half_ops", "cs_wm_half_cmp", "cs_wm_bfm64", "cs_wm_scc_rfl", | 485 | elif name in ("cs_store", "cs_smem_soffset_imm", "cs_wave64_ballot", "cs_wm_half_ops", "cs_wm_half_cmp", "cs_wm_bfm64", "cs_wm_scc_rfl", |
| 486 | "cs_w64x_readlane", "cs_w64x_writelane", "cs_w64x_readfirstlane", "cs_w64x_bpermute", | 486 | "cs_w64x_readlane", "cs_w64x_writelane", "cs_w64x_readfirstlane", "cs_w64x_bpermute", |
| 487 | "cs_w64x_branch", "cs_w64x_ballot", "cs_w64x_wg128_branches", "cs_w64x_lds_raw", | 487 | "cs_w64x_branch", "cs_w64x_ballot", "cs_w64x_wg128_branches", "cs_w64x_lds_raw", |
| 488 | "cs_w64x_lds_war", "cs_w64x_partial", "cs_w64x_sbarrier", "cs_w64x_load_ballot_load"): | 488 | "cs_w64x_lds_war", "cs_w64x_partial", "cs_w64x_sbarrier", "cs_w64x_load_ballot_load"): |
| 489 | cs_dump_wants = { | 489 | cs_dump_wants = { |
| 490 | "cs_store": [0x400080FF, 0xE00003FF, 0x3C004000, 0xEEEEEEEE, 0x40003C00, 0xBC003800], | 490 | "cs_store": [0x400080FF, 0xE00003FF, 0x3C004000, 0xEEEEEEEE, 0x40003C00, 0xBC003800], |
| 491 | # base + soffset + imm (cs_smem_soffset_imm.asm); out[4..7] are seeds the shader leaves alone | ||
| 492 | "cs_smem_soffset_imm": [0x5EED0024, 0x5EED0028, 0x5EED002C, 0x5EED0030, | ||
| 493 | 0x5EED0010, 0x5EED0014, 0x5EED0018, 0x5EED001C], | ||
| 491 | "cs_wave64_ballot": [32, 16, 24, 40, 8, 48], | 494 | "cs_wave64_ballot": [32, 16, 24, 40, 8, 48], |
| 492 | "cs_wm_half_ops": [32, 16, 16, 0, 16], | 495 | "cs_wm_half_ops": [32, 16, 16, 0, 16], |
| 493 | "cs_wm_half_cmp": [1, 0, 1, 1], | 496 | "cs_wm_half_cmp": [1, 0, 1, 1], |
| @@ -508,13 +511,13 @@ def run_suite(a, work: str) -> int: | |||
| 508 | "cs_w64x_load_ballot_load": [43, 74, 75, 42, 42, 18, 41, 32], | 511 | "cs_w64x_load_ballot_load": [43, 74, 75, 42, 42, 18, 41, 32], |
| 509 | } | 512 | } |
| 510 | want = cs_dump_wants[name] | 513 | want = cs_dump_wants[name] |
| 511 | # Every dump but cs_store is a whole-wave (wave64) mask test: ask for a 64-wide subgroup and skip, as | 514 | # Every dump but cs_store and cs_smem_soffset_imm is a whole-wave (wave64) mask test: ask for a 64-wide subgroup and skip, as |
| 512 | # check.py does, where the device has none (vk_compute_test exits 77) instead of reporting a failure. | 515 | # check.py does, where the device has none (vk_compute_test exits 77) instead of reporting a failure. |
| 513 | # With LEONIDA_W64_EMULATE=1 they were translated with --wave64-emulate and run on any subgroup size. | 516 | # With LEONIDA_W64_EMULATE=1 they were translated with --wave64-emulate and run on any subgroup size. |
| 514 | # cs_w64x_partial (a 40-thread group) can't have full subgroups: it asks for size 64 without them. | 517 | # cs_w64x_partial (a 40-thread group) can't have full subgroups: it asks for size 64 without them. |
| 515 | emulated = os.environ.get("LEONIDA_W64_EMULATE") == "1" | 518 | emulated = os.environ.get("LEONIDA_W64_EMULATE") == "1" |
| 516 | partial = name == "cs_w64x_partial" | 519 | partial = name == "cs_w64x_partial" |
| 517 | wave64 = name != "cs_store" and not emulated and not partial | 520 | wave64 = name not in ("cs_store", "cs_smem_soffset_imm") and not emulated and not partial |
| 518 | if partial and not emulated: | 521 | if partial and not emulated: |
| 519 | cs_env = dict(os.environ, VKC_SUBGROUP_SIZE="64") | 522 | cs_env = dict(os.environ, VKC_SUBGROUP_SIZE="64") |
| 520 | rc, msg = run_cmd([vk_compute, spv, "1", "dump"] + (["--require-wave64"] if wave64 else []), env=cs_env) | 523 | rc, msg = run_cmd([vk_compute, spv, "1", "dump"] + (["--require-wave64"] if wave64 else []), env=cs_env) |
| @@ -525,7 +528,7 @@ def run_suite(a, work: str) -> int: | |||
| 525 | elif rc == 0 and dump_line: | 528 | elif rc == 0 and dump_line: |
| 526 | vals = [int(x) for x in dump_line.split("=")[1].split()[:len(want)]] | 529 | vals = [int(x) for x in dump_line.split("=")[1].split()[:len(want)]] |
| 527 | ok = vals == want | 530 | ok = vals == want |
| 528 | fmt = hex if name == "cs_store" else str | 531 | fmt = hex if name in ("cs_store", "cs_smem_soffset_imm") else str |
| 529 | results.append((name, ok, " ".join(fmt(x) for x in vals))) | 532 | results.append((name, ok, " ".join(fmt(x) for x in vals))) |
| 530 | else: | 533 | else: |
| 531 | results.append((name, False, msg)) | 534 | results.append((name, False, msg)) |