toposort is a function [pr] (#10004)

This commit is contained in:
George Hotz
2025-04-23 16:25:03 +01:00
committed by GitHub
parent 0730ff0e50
commit 2ed3acd767
32 changed files with 87 additions and 101 deletions

View File

@@ -94,7 +94,7 @@ class TestTensorUopRepresentation(unittest.TestCase):
def test_consts_dont_have_buffers(self):
a = Tensor.ones(10, 10)
print(a.lazydata)
buffers_in_parents = [x.op for x in a.lazydata.toposort if x.op is Ops.BUFFER]
buffers_in_parents = [x.op for x in a.lazydata.toposort() if x.op is Ops.BUFFER]
self.assertEqual(len(buffers_in_parents), 0)
# currently, COPY has an extra BUFFER on the output