reorder binops (#9328)

* reorder binops

* test improvements + fix string tests

* ugh, okay this
This commit is contained in:
George Hotz
2025-03-03 14:58:18 +08:00
committed by GitHub
parent 146eb73790
commit 2cc4cb74f0
5 changed files with 15 additions and 11 deletions

View File

@@ -102,7 +102,7 @@ class TestLinearizer(unittest.TestCase):
stores = [u for u in lin.uops if u.op is Ops.STORE]
mutable_bufs = dedup(flatten([[x for x in u.src[0].toposort if x.op is Ops.DEFINE_GLOBAL] for u in stores]))
assert len(mutable_bufs) == len(stores) == 2
assert [u.arg for u in mutable_bufs] == [0, 1]
self.assertSetEqual(set([u.arg for u in mutable_bufs]), set([0,1]))
def _test_no_nested_ranges(self, lins, skip=None):
for l in lins: