mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
test_gemm needs .clone() on eye (#16629)
This commit is contained in:
parent
10bdb9c9d0
commit
41aa2fe119
1 changed files with 2 additions and 2 deletions
|
|
@ -41,7 +41,7 @@ class TestTiny(unittest.TestCase):
|
|||
|
||||
def test_gemm(self, N=getenv("GEMM_N", 64)):
|
||||
a = Tensor.ones(N,N).contiguous()
|
||||
b = Tensor.eye(N).contiguous()
|
||||
b = Tensor.eye(N).clone()
|
||||
lst = (out:=a@b).tolist()
|
||||
for y in range(N):
|
||||
for x in range(N):
|
||||
|
|
@ -50,7 +50,7 @@ class TestTiny(unittest.TestCase):
|
|||
|
||||
def test_gemv(self, N=getenv("GEMV_N", 64), out_dtype=dtypes.float):
|
||||
a = Tensor.ones(1,N).contiguous()
|
||||
b = Tensor.eye(N).contiguous()
|
||||
b = Tensor.eye(N).clone()
|
||||
lst = (out:=a@b).tolist()
|
||||
for x in range(N):
|
||||
self.assertEqual(lst[0][x], 1.0, msg=f"mismatch at {x}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue