From 171401e8dfb7117d6fb0628d3eb84fceaaee3eec Mon Sep 17 00:00:00 2001 From: Christopher Milan Date: Wed, 27 May 2026 14:09:05 -0700 Subject: [PATCH] skip modulo by zero in test_dtype_alu (#16404) --- test/backend/test_dtype_alu.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/backend/test_dtype_alu.py b/test/backend/test_dtype_alu.py index 05c3074bf4..71679a37a6 100644 --- a/test/backend/test_dtype_alu.py +++ b/test/backend/test_dtype_alu.py @@ -111,6 +111,7 @@ def universal_test_cast(a, in_dtype, dtype): def universal_test_midcast(a, b, c, op1, op2, d1:DType, d2:DType): if not isinstance(op1, tuple): op1 = (op1, op1) if not isinstance(op2, tuple): op2 = (op2, op2) + if op1[0] == operator.mod and b == 0: return # lt and max with nan is undefined in tinygrad if op1[0] in (operator.lt, Tensor.maximum) and (math.isnan(a) or math.isnan(b)): return if op2[0] in (operator.lt, Tensor.maximum) and math.isnan(c): return