mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-10 07:28:15 -05:00
move optimize_local_size (#2221)
* move optimize_local_size * interpret_ast
This commit is contained in:
@@ -2,8 +2,7 @@
|
||||
import unittest
|
||||
import numpy as np
|
||||
from tinygrad.tensor import Tensor
|
||||
from tinygrad.ops import GlobalCounters, Device
|
||||
from tinygrad.graph import nm
|
||||
from tinygrad.ops import Device
|
||||
from tinygrad.helpers import dtypes
|
||||
|
||||
N = 200 # has to be bigger than the cache to fail
|
||||
@@ -50,16 +49,6 @@ class TestAssign(unittest.TestCase):
|
||||
ba2 = a.lazydata.realized
|
||||
# NOTE: don't test that it's assigned
|
||||
#assert ba1 == ba2 and ba1 != bb1
|
||||
|
||||
"""
|
||||
if len(GlobalCounters.cache):
|
||||
runner, args = GlobalCounters.cache[0]
|
||||
b0, b1, b2 = args
|
||||
print(nm(b0), id(b0.cl))
|
||||
print(nm(b1), id(b1.cl))
|
||||
print(nm(b2), id(b2.cl))
|
||||
"""
|
||||
|
||||
np.testing.assert_allclose(a.numpy(), np.arange(N*N).reshape((N,N)) + np.arange(N*N).reshape((N,N)).transpose(1,0))
|
||||
|
||||
# TODO: is there a way to sneak in a permute such that it returns the wrong answer?
|
||||
|
||||
Reference in New Issue
Block a user