Skip to content

Commit

Permalink
broken tests for tinygrad#862 and tinygrad#942
Browse files Browse the repository at this point in the history
  • Loading branch information
geohot committed Jun 10, 2023
1 parent c62c64f commit 48e9461
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/test_ops.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import torch
import time
import math
import numpy as np
import unittest
from tinygrad.tensor import Tensor
Expand Down Expand Up @@ -941,6 +942,17 @@ def test_double_slice(self):
helper_test_op([(4,4)], lambda x: x[:, 1:2][0:1])
helper_test_op([(4,4)], lambda x: x[:, 1:2][:, 0:1])

@unittest.skip("this test is broken #862")
def test_max_inf(self):
n = Tensor([1, float("nan")]).max().numpy()
assert math.isnan(n.item()), f"{n.item()} is not nan"

@unittest.skip("this test is broken #942")
def test_inf_where(self):
x = Tensor.full((3, 3), float("inf"))
n = (x < 0).where(x, 1).numpy()
assert np.all(n == 1.)

if __name__ == '__main__':
np.random.seed(1337)
unittest.main(verbosity=2)

0 comments on commit 48e9461

Please sign in to comment.