mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
14 lines
362 B
Python
14 lines
362 B
Python
import unittest
|
|
from tinygrad import Tensor
|
|
|
|
class TestScheduleCache(unittest.TestCase):
|
|
def test_simple(self):
|
|
a = Tensor.ones(10).contiguous()
|
|
b = Tensor.ones(10).contiguous()
|
|
Tensor.realize(a, b)
|
|
for _ in range(5):
|
|
num = (a.sum().contiguous()+b.sum().contiguous()).item()
|
|
print(num)
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|