diff options
| author | Henrique Vinagre <henriquevinagre@tecnico.ulisboa.pt> | 2026-11-22 11:53:45 +0000 |
|---|---|---|
| committer | Henrique Vinagre <henriquevinagre@tecnico.ulisboa.pt> | 2026-11-22 18:34:11 +0000 |
| commit | 2426df3d5ed7bf419f8abfcbdd2a94bae9e1ae8f (patch) | |
| tree | 9ce84db79dd17a65e62e104eb0b72e29e29656c5 /scripts | |
| parent | ec8ec4c9a46c6623f1a9c125afd3566da97f1e0c (diff) | |
GPU tests: wire cs_fma_fused in run_gpu_tests and accept GLSL Fma split on RADV
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/run_gpu_tests.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py index 3a23250fc..e41ac6766 100644 --- a/scripts/run_gpu_tests.py +++ b/scripts/run_gpu_tests.py | |||
| @@ -42,6 +42,7 @@ from check import (WAVE32_LANE_DUMPS, WAVE32_LANE_ENV, bitmask_perm_narrow_skip, | |||
| 42 | from check import PIXEL_VERTEX, interp_f16_high_problem, ij_computed_problem, mandelbrot_problem # pixel producers and checks | 42 | from check import PIXEL_VERTEX, interp_f16_high_problem, ij_computed_problem, mandelbrot_problem # pixel producers and checks |
| 43 | from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries | 43 | from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries |
| 44 | from check import wide_pixel_skip # ps_w64x_readlane: judged only where the fragment stage was required 64-wide | 44 | from check import wide_pixel_skip # ps_w64x_readlane: judged only where the fragment stage was required 64-wide |
| 45 | from check import FMA_FUSED_ENV, judge_fma_fused # cs_fma_fused: strict under LEONIDA_FMA=khr, fused/split under glsl | ||
| 45 | 46 | ||
| 46 | 47 | ||
| 47 | def make_dxbc(chunks: list[tuple[bytes, bytes]]) -> bytes: | 48 | def make_dxbc(chunks: list[tuple[bytes, bytes]]) -> bytes: |
| @@ -880,6 +881,18 @@ def run_suite(a, work: str) -> int: | |||
| 880 | n = len(CVT_F32_SAT_CASES) | 881 | n = len(CVT_F32_SAT_CASES) |
| 881 | results.append((name, not wrong, f"{n}/{n} inputs exact" if not wrong | 882 | results.append((name, not wrong, f"{n}/{n} inputs exact" if not wrong |
| 882 | else f"{len(wrong)}/{n} inputs wrong, first {wrong[0]}")) | 883 | else f"{len(wrong)}/{n} inputs wrong, first {wrong[0]}")) |
| 884 | elif name == "cs_fma_fused": | ||
| 885 | # Single-rounded f32 FMA (+ f16 round-to-odd): strict under LEONIDA_FMA=khr (OpFmaKHR, exit 77 if | ||
| 886 | # unsupported), fused-or-split f32 allowed under default --fma glsl (e.g. Mesa RADV splits 5/7). | ||
| 887 | rc, msg = run_cmd([vk_compute, spv, "1", "dump"], env=dict(cs_env or os.environ, **FMA_FUSED_ENV)) | ||
| 888 | if rc == UNSUPPORTED: | ||
| 889 | results.append((name, None, unsupported_skip(msg))) | ||
| 890 | elif rc != 0: | ||
| 891 | results.append((name, False, msg)) | ||
| 892 | else: | ||
| 893 | khr = os.environ.get("LEONIDA_FMA") == "khr" | ||
| 894 | ok, detail = judge_fma_fused(dump_words(msg), khr=khr) | ||
| 895 | results.append((name, ok, detail)) | ||
| 883 | elif name == "cs_wavemask": | 896 | elif name == "cs_wavemask": |
| 884 | # Whole-wave mask test, as in check.py: needs a 64-wide subgroup, skipped where the device has none. | 897 | # Whole-wave mask test, as in check.py: needs a 64-wide subgroup, skipped where the device has none. |
| 885 | # With LEONIDA_W64_EMULATE=1 it was translated with --wave64-emulate and runs on any subgroup size. | 898 | # With LEONIDA_W64_EMULATE=1 it was translated with --wave64-emulate and runs on any subgroup size. |