mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-09 15:08:02 -05:00
support symbolic reshape with non-contiguous (#4844)
* support symbolic reshape with non-contiguous pre-requisite for symbolic arange (make symbolic ones that can be folded). * test cases * typo * shorter
This commit is contained in:
@@ -182,8 +182,7 @@ class TestSymbolicJit(unittest.TestCase):
|
||||
jf = TinyJit(f)
|
||||
for i in range(1, 5):
|
||||
vi = Variable("i", 1, 10).bind(i)
|
||||
# TODO: without contiguous, the CONST shape are different in jit
|
||||
t = Tensor.ones(i).contiguous()
|
||||
t = Tensor.ones(i)
|
||||
symbolic = jf(t.reshape(vi)).item()
|
||||
expected = f(t).item()
|
||||
np.testing.assert_equal(symbolic, expected)
|
||||
|
||||
Reference in New Issue
Block a user