Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions runtime/test/shaders/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -2062,6 +2062,21 @@ def wide_pixel_skip(name, out):
return Skip(f"SKIP (this device cannot require a {want}-wide fragment subgroup{seen})")


def paravirtual_exp2_skip(name, out):
"""A Skip for the exact-power-of-two exp2 case on Apple's Paravirtual device, else None.

That device's OpExp2 lands two ulps low on 2^-125 (measured on the CI runner), while real Apple hardware returns the
exact pattern (measured on an M5 Max with MoltenVK 1.4.2). So the case is judged wherever the device can be exact and
skipped where it cannot, rather than given a tolerance that would weaken it everywhere.
"""
if name != "ps_exp_f32_denorm_rt":
return None
m = re.search(r"^device: (.*)$", out, re.MULTILINE)
if not m or "Paravirtual" not in m.group(1):
return None
return Skip("SKIP (Apple Paravirtual: OpExp2 lands two ulps low on 2^-125, real Apple hardware is exact)")


def f32(x):
"""x rounded to the nearest float32. One double add or multiply of two float32 values, then this, is the exact
IEEE float32 result, so a model built from it matches the GPU bit for bit."""
Expand Down
4 changes: 4 additions & 0 deletions scripts/run_gpu_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
from check import NAN_PAYLOAD_TEST, nan_payload_problem
from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries
from check import wide_pixel_skip # ps_w64x_readlane: judged only where the fragment stage was required 64-wide
from check import paravirtual_exp2_skip # ps_exp_f32_denorm_rt: judged only where OpExp2 is exact on 2^-125
from check import FMA_FUSED_ENV, judge_fma_fused # cs_fma_fused: strict under LEONIDA_FMA=khr, fused/split under glsl
from check import bary_persp_problem # ps_persp_bary's perspective-correct reference

Expand Down Expand Up @@ -1655,6 +1656,9 @@ def run_suite(a, work: str) -> int:
if skip := wide_pixel_skip(name, msg): # a 64-wide pixel stage the device could not give: nothing to judge
results.append((name, None, str(skip)))
continue
if skip := paravirtual_exp2_skip(name, msg): # Apple Paravirtual: OpExp2 is two ulps low on 2^-125
results.append((name, None, str(skip)))
continue
if name in const_wants:
if name == "ps_vcmpx_forms" and (skip := vcmpx_forms_narrow_skip(msg)):
ok, detail = None, str(skip)
Expand Down
Loading