Revert "Add insert_before to Linearizer Functions (#4320)" (#4421)

This reverts commit 664b563c91.
This commit is contained in:
qazal
2024-05-04 22:50:21 +08:00
committed by GitHub
parent 5f3bae378f
commit 267bbb57f9
3 changed files with 55 additions and 82 deletions

View File

@@ -46,14 +46,5 @@ class TestUOpGraph(unittest.TestCase):
self.assertEqual(out.uop, UOps.CONST)
self.assertEqual(out.arg, 0)
def test_insert_before(self):
g = UOpGraph()
g.add(UOps.CONST, dtypes.int, arg=0)
three = g.add(UOps.CONST, dtypes.int, arg=3)
g.add(UOps.CONST, dtypes.int, arg=1, insert_before=three)
g.add(UOps.CONST, dtypes.int, arg=2, insert_before=three)
g.add(UOps.CONST, dtypes.int, arg=4)
for i,uop in enumerate(g.uops): self.assertEqual(i, uop.arg)
if __name__ == '__main__':
unittest.main(verbosity=2)