mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
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:
parent
4fcea8493d
commit
f461ccf407
1 changed files with 1 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue