exclude op2 nan lt in test_dtype_alu (#12024)

failure: https://github.com/tinygrad/tinygrad/actions/runs/17490320000/job/49679581331?pr=12022#step:6:125
This commit is contained in:
qazal 2025-09-05 14:14:22 +03:00 committed by GitHub
commit f461ccf407
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -89,6 +89,7 @@ def universal_test_midcast(a, b, c, op1, op2, d1:DType, d2:DType):
if not isinstance(op2, tuple): op2 = (op2, op2)
# lt with nan is undefined in tinygrad
if op1[0] == operator.lt and (math.isnan(a) or math.isnan(b)): return
if op2[0] == operator.lt and math.isnan(c): return
at, bt, ct = Tensor([a], dtype=d1), Tensor([b], dtype=d1), Tensor([c], dtype=d2)
an, bn, cn = np.array([a]).astype(_to_np_dtype(d1)), np.array([b]).astype(_to_np_dtype(d1)), np.array([c]).astype(_to_np_dtype(d2))
tensor_value = op2[0](op1[0](at, bt).cast(d2), ct).numpy()