diff options
| author | gabsilvs <142851434+gabsilvs@users.noreply.github.com> | 2026-11-22 21:35:01 -0300 |
|---|---|---|
| committer | gabsilvs <142851434+gabsilvs@users.noreply.github.com> | 2026-11-22 21:35:01 -0300 |
| commit | 87da9327703c24e6c36b6103b5918a61ba03e9d4 (patch) | |
| tree | 10816968022e9f31960dd54543b0dac7a41dd822 | |
| parent | b9a8aca16a1550566ee042d5656d4443d6525912 (diff) | |
run_gpu_tests: an unsupported: reason wins over the generic wave64 skip
For a whole-wave dump a missing OpFmaKHR was reported as "no 64-wide compute
subgroup" on a device that does have one, because the wave64 rule ran before
the reason the program printed. Read the "unsupported:" line first; without
one the old text stays.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015z45kpL5aWzXuYTbhn6b52
| -rw-r--r-- | scripts/run_gpu_tests.py | 8 | ||||
| -rw-r--r-- | tests/test_run_gpu_tests.py | 9 |
2 files changed, 13 insertions, 4 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py index 4a276ad2c..3883073ff 100644 --- a/scripts/run_gpu_tests.py +++ b/scripts/run_gpu_tests.py | |||
| @@ -343,13 +343,13 @@ def judge_cs_dump(rc: int, msg: str, want: list[int], *, wave64: bool, partial: | |||
| 343 | wave64: it was run with --require-wave64, so exit 77 is a skip and the 64-wide confirmation must be printed. | 343 | wave64: it was run with --require-wave64, so exit 77 is a skip and the 64-wide confirmation must be printed. |
| 344 | partial: a group smaller than a wave, run at subgroup size 64 without full subgroups; skipped when the device | 344 | partial: a group smaller than a wave, run at subgroup size 64 without full subgroups; skipped when the device |
| 345 | reports no subgroup size of 64. emulated: translated with --wave64-emulate, runs on any subgroup size.""" | 345 | reports no subgroup size of 64. emulated: translated with --wave64-emulate, runs on any subgroup size.""" |
| 346 | no64 = partial and not emulated and not any(int(x) >= 64 for x in re.findall(r"subgroup \d+\.\.(\d+)", msg)) | 346 | if rc == 77: # the program refused the module and said why ("unsupported: <why>"): a skip with that reason, in every mode |
| 347 | if (wave64 and rc == 77) or (no64 and rc == 0): | ||
| 348 | return None, "SKIP (no 64-wide compute subgroup on this device)" | ||
| 349 | if rc == 77: # the program refused the module: "unsupported: <why>" is a skip, as for every other missing feature | ||
| 350 | why = next((ln for ln in msg.splitlines() if ln.startswith("unsupported:")), None) | 347 | why = next((ln for ln in msg.splitlines() if ln.startswith("unsupported:")), None) |
| 351 | if why: | 348 | if why: |
| 352 | return None, "SKIP (" + why[len("unsupported:"):].strip() + ")" | 349 | return None, "SKIP (" + why[len("unsupported:"):].strip() + ")" |
| 350 | no64 = partial and not emulated and not any(int(x) >= 64 for x in re.findall(r"subgroup \d+\.\.(\d+)", msg)) | ||
| 351 | if (wave64 and rc == 77) or (no64 and rc == 0): | ||
| 352 | return None, "SKIP (no 64-wide compute subgroup on this device)" | ||
| 353 | if rc == 0 and wave64 and "compute subgroup size: 64" not in msg.splitlines(): | 353 | if rc == 0 and wave64 and "compute subgroup size: 64" not in msg.splitlines(): |
| 354 | return False, "64-wide subgroup was not confirmed (rebuild vk_compute_test)" | 354 | return False, "64-wide subgroup was not confirmed (rebuild vk_compute_test)" |
| 355 | words = dump_words(msg) | 355 | words = dump_words(msg) |
diff --git a/tests/test_run_gpu_tests.py b/tests/test_run_gpu_tests.py index f39cb67c2..cc7bbbb16 100644 --- a/tests/test_run_gpu_tests.py +++ b/tests/test_run_gpu_tests.py | |||
| @@ -198,6 +198,15 @@ class WholeWaveDump(unittest.TestCase): | |||
| 198 | self.assertIs(ok, None) | 198 | self.assertIs(ok, None) |
| 199 | self.assertTrue(detail.startswith("SKIP")) | 199 | self.assertTrue(detail.startswith("SKIP")) |
| 200 | 200 | ||
| 201 | def test_a_77_with_an_unsupported_reason_keeps_that_reason(self): | ||
| 202 | """A 64-wide device, a module that needs OpFmaKHR the device lacks: the skip names OpFmaKHR, not the subgroup.""" | ||
| 203 | msg = ("unsupported: cs_x.spv needs OpFmaKHR (VK_KHR_shader_fma, shaderFmaFloat32) and the device lacks it; " | ||
| 204 | "translate with --fma glsl\n") | ||
| 205 | ok, detail = self.judge(77, DEVICE_64 + msg) | ||
| 206 | self.assertIs(ok, None) | ||
| 207 | self.assertTrue(detail.startswith("SKIP (cs_x.spv needs OpFmaKHR"), detail) | ||
| 208 | self.assertNotIn("64-wide", detail) | ||
| 209 | |||
| 201 | def test_right_words_without_the_confirmation_fail(self): # a vk_compute_test that ignores the flag | 210 | def test_right_words_without_the_confirmation_fail(self): # a vk_compute_test that ignores the flag |
| 202 | ok, detail = self.judge(0, DEVICE_64 + dump(WANT)) | 211 | ok, detail = self.judge(0, DEVICE_64 + dump(WANT)) |
| 203 | self.assertIs(ok, False) | 212 | self.assertIs(ok, False) |