diff options
| author | DeSunShine <87091315+DeSunShine@users.noreply.github.com> | 2026-11-23 22:51:17 +0300 |
|---|---|---|
| committer | DeSunShine <87091315+DeSunShine@users.noreply.github.com> | 2026-11-24 11:41:59 +0300 |
| commit | 10b0052e570cc6786681bbcf36b61d85b20fc5a8 (patch) | |
| tree | cc12dd758016172a15b0eda849f571007c0cae86 /scripts/run_gpu_tests.py | |
| parent | ce75f144c729d22f4b9cae8c310a3bc814a6c56d (diff) | |
cs_div_fmas_f64_rt: the run-time-operand twin, and name the measured GPUs
Review of #8750: the fused half of the claim had no fixture. The new
cs_div_fmas_f64_rt reads the same a and c from s4..s7 (VKC_SGPRS), so the
driver cannot fold the Fma; it is fused under the default GLSL Fma on the
RTX 4090 here. design.md now names the measured GPUs: the all-constant
Fma is split on the RTX 4090, RTX 3070 and Quadro RTX 4000 (Turing,
Linux) and fused on an RTX 5060 Laptop (Blackwell).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts/run_gpu_tests.py')
| -rw-r--r-- | scripts/run_gpu_tests.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py index ba97bfb40..6ecf2b9ae 100644 --- a/scripts/run_gpu_tests.py +++ b/scripts/run_gpu_tests.py | |||
| @@ -258,6 +258,8 @@ def read_raw_u32(path: str) -> list[tuple[int, int, int, int]]: | |||
| 258 | return [struct.unpack_from("<4I", data, 16 * i) for i in range(n)] | 258 | return [struct.unpack_from("<4I", data, 16 * i) for i in range(n)] |
| 259 | 259 | ||
| 260 | 260 | ||
| 261 | # cs_div_fmas_f64_rt's operands a = 1 + 2^-30, c = -(1 + 2^-29) as s4..s7 (low word first). | ||
| 262 | DIV_FMAS_F64_SGPRS = "0x00400000,0x3ff00000,0x00800000,0xbff00000" | ||
| 261 | UNSUPPORTED = 77 # vk_harness: the device lacks a stage the test draws with (geometry or mesh shaders) | 263 | UNSUPPORTED = 77 # vk_harness: the device lacks a stage the test draws with (geometry or mesh shaders) |
| 262 | 264 | ||
| 263 | 265 | ||
| @@ -1092,10 +1094,12 @@ def run_suite(a, work: str) -> int: | |||
| 1092 | ok, detail = judge_cs_dump(rc, msg, [0, 0x40040000], wave64=False, partial=False, emulated=False, | 1094 | ok, detail = judge_cs_dump(rc, msg, [0, 0x40040000], wave64=False, partial=False, emulated=False, |
| 1093 | hexwords=True) | 1095 | hexwords=True) |
| 1094 | results.append((name, ok, detail)) | 1096 | results.append((name, ok, detail)) |
| 1095 | elif name == "cs_div_fmas_f64": | 1097 | elif name in ("cs_div_fmas_f64", "cs_div_fmas_f64_rt"): |
| 1096 | # One-rounding binary64 FMA: strict where the translator emitted OpFmaKHR on doubles (shaderFmaFloat64, | 1098 | # One-rounding binary64 FMA: strict where the translator emitted OpFmaKHR on doubles (shaderFmaFloat64, |
| 1097 | # --fma khr); under the default GLSL Fma the split result (0) is allowed, as cs_fma_fused allows it. | 1099 | # --fma khr); under the default GLSL Fma the split result (0) is allowed, as cs_fma_fused allows it. |
| 1098 | rc, msg = run_cmd([vk_compute, spv, "1", "dump"], env=cs_env) | 1100 | # The _rt fixture reads the same operands from s4..s7, so the driver cannot fold the Fma at compile time. |
| 1101 | env = dict(cs_env or os.environ, VKC_SGPRS=DIV_FMAS_F64_SGPRS) if name.endswith("_rt") else cs_env | ||
| 1102 | rc, msg = run_cmd([vk_compute, spv, "1", "dump"], env=env) | ||
| 1099 | if rc == UNSUPPORTED: # no shaderFloat64, or (--fma khr) no shaderFmaFloat64 | 1103 | if rc == UNSUPPORTED: # no shaderFloat64, or (--fma khr) no shaderFmaFloat64 |
| 1100 | results.append((name, None, unsupported_skip(msg))) | 1104 | results.append((name, None, unsupported_skip(msg))) |
| 1101 | else: | 1105 | else: |
| @@ -1105,7 +1109,8 @@ def run_suite(a, work: str) -> int: | |||
| 1105 | ok = rc == 0 and (words == fused or (not strict and words == split)) | 1109 | ok = rc == 0 and (words == fused or (not strict and words == split)) |
| 1106 | detail = " ".join(hex(x) for x in words) if words else msg | 1110 | detail = " ".join(hex(x) for x in words) if words else msg |
| 1107 | if ok and words == split: | 1111 | if ok and words == split: |
| 1108 | detail += " (split: the driver rounded this all-constant GLSL Fma on doubles twice; --fma khr fixes it)" | 1112 | detail += (" (split: the driver rounded GLSL Fma on doubles twice%s; --fma khr fixes it)" |
| 1113 | % ("" if name.endswith("_rt") else " when folding the constants")) | ||
| 1109 | results.append((name, ok, detail)) | 1114 | results.append((name, ok, detail)) |
| 1110 | elif name == "cs_cvt_f32_sat": | 1115 | elif name == "cs_cvt_f32_sat": |
| 1111 | # #300's saturating float -> int conversions: one dispatch per input word in s4 (VKC_SGPRS). | 1116 | # #300's saturating float -> int conversions: one dispatch per input word in s4 (VKC_SGPRS). |