tinyfs tweaks (#13444)

This commit is contained in:
wozeparrot
2025-11-24 18:07:32 -08:00
committed by GitHub
parent f46bc31156
commit 249553a119
6 changed files with 19 additions and 17 deletions

View File

@@ -3,19 +3,19 @@ from tinygrad import Tensor
class TestLoadStore(unittest.TestCase):
def test_load_shape(self):
t = Tensor(bytes(16)).load(1024).kernelize()
t = Tensor(bytes(16)).fs_load(1024).kernelize()
assert t.shape == (1024,), t.shape
def test_store_shape(self):
t = Tensor.zeros(1024).store().kernelize()
t = Tensor.zeros(1024).fs_store().kernelize()
assert t.shape == (16,), t.shape
def test_load_large_shape(self):
t = Tensor(bytes(16)).load(10_000_000).kernelize()
t = Tensor(bytes(16)).fs_load(10_000_000).kernelize()
assert t.shape == (10_000_000,), t.shape
def test_store_large_shape(self):
t = Tensor.zeros(10_000_000).store().kernelize()
t = Tensor.zeros(10_000_000).fs_store().kernelize()
assert t.shape == (16,), t.shape
if __name__ == "__main__":