mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-09 15:08:02 -05:00
Should this symbolic test fail? (#4501)
* add test * skip test * use expected failure decorator --------- Co-authored-by: schlimeszn <schlimeszn@gmail.com> Co-authored-by: reddyn <nikidsniper@gmail.com>
This commit is contained in:
@@ -45,6 +45,18 @@ class TestTensorVariable(unittest.TestCase):
|
||||
ret = t.mean(axis=1).reshape(2, 1).numpy()
|
||||
assert np.all(ret == 1)
|
||||
|
||||
@unittest.expectedFailure
|
||||
def test_symbolic_mean_2d_add(self):
|
||||
add_term = Variable("c", 0, 10)
|
||||
add_term.bind(1)
|
||||
vv = Variable("a", 1, 10)
|
||||
vv.bind(1)
|
||||
vv2 = Variable("b", 1, 10)
|
||||
vv2.bind(1)
|
||||
t = Tensor.ones(2, 2).contiguous().reshape(vv2+add_term, vv+add_term)
|
||||
ret = t.mean().item()
|
||||
assert ret == 1
|
||||
|
||||
def test_symbolic_var(self):
|
||||
vv = Variable("a", 1, 10).bind(2)
|
||||
t = Tensor.ones(2, 2).contiguous().reshape(2, vv)
|
||||
|
||||
Reference in New Issue
Block a user