upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tools/f64_diff.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/f64_diff.py')
-rw-r--r--tools/f64_diff.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/f64_diff.py b/tools/f64_diff.py
index 33d46aa0f..299d8f447 100644
--- a/tools/f64_diff.py
+++ b/tools/f64_diff.py
@@ -281,8 +281,8 @@ def parse_source_args(line):
281 return bits[0], bits[1].rstrip(","), [x.strip() for x in args] 281 return bits[0], bits[1].rstrip(","), [x.strip() for x in args]
282 282
283 283
284def ref_program(lines, include_known=False): 284def ref_program(lines, include_known=False, exec_lo=M32):
285 vgpr, sgpr, mode, vcc, active = {}, {}, 0, 0, M32 285 vgpr, sgpr, mode, vcc, active = {}, {}, 0, 0, exec_lo
286 for line in lines: 286 for line in lines:
287 s = line.strip() 287 s = line.strip()
288 if not s or s.startswith((";", "exp ", "s_endpgm")): continue 288 if not s or s.startswith((";", "exp ", "s_endpgm")): continue
@@ -629,7 +629,8 @@ def run_one(lines, name, tmp, oracle="translator", gpu=None, include_known=False
629 return "skip", f"KNOWN_DIVERGENCE fclamp-nan-zero: {KNOWN_DIVERGENCES['fclamp-nan-zero']}", None, None 629 return "skip", f"KNOWN_DIVERGENCE fclamp-nan-zero: {KNOWN_DIVERGENCES['fclamp-nan-zero']}", None, None
630 if line.split() and line.split()[0] in ("v_add_f64", "v_cvt_f32_f64", "v_rcp_f64", "v_rsq_f64", "v_sqrt_f64", "v_div_fmas_f64") and ("|" in line or "-v[" in line or "-s[" in line): 630 if line.split() and line.split()[0] in ("v_add_f64", "v_cvt_f32_f64", "v_rcp_f64", "v_rsq_f64", "v_sqrt_f64", "v_div_fmas_f64") and ("|" in line or "-v[" in line or "-s[" in line):
631 return "skip", f"KNOWN_DIVERGENCE double-neg-abs: {KNOWN_DIVERGENCES['double-neg-abs']}", None, None 631 return "skip", f"KNOWN_DIVERGENCE double-neg-abs: {KNOWN_DIVERGENCES['double-neg-abs']}", None, None
632 try: expected = ref_program(lines, include_known) 632 # The hardware kernel is one lane, so EXEC is 1 there and a program that reads exec_lo back sees 1.
633 try: expected = ref_program(lines, include_known, 1 if oracle == "hw" else M32)
633 except SkipCase as exc: return "skip", str(exc), None, None 634 except SkipCase as exc: return "skip", str(exc), None, None
634 except (ArithmeticError, IndexError, KeyError, ValueError) as exc: 635 except (ArithmeticError, IndexError, KeyError, ValueError) as exc:
635 return "skip", f"reference limitation: {type(exc).__name__}: {exc}", None, None 636 return "skip", f"reference limitation: {type(exc).__name__}: {exc}", None, None