allow VIEW(BUFFER) in Tensor UOps [pr] (#9210)

* allow VIEW(BUFFER) in Tensor UOps [pr]

* still reshapes

* update becomes_map tests

* bring copy folder to the scheduler

* lint

* only sgd left

* optimizer assign

* 13 kernels

* rename to test_reorder_expand + assert VIEW
This commit is contained in:
qazal
2025-02-24 14:06:15 +02:00
committed by GitHub
parent 1d06d61b16
commit 14aa2395d0
8 changed files with 29 additions and 39 deletions

View File

@@ -34,7 +34,7 @@ class TestTensorMutates(unittest.TestCase):
is_pattern_uop(c.lazydata.base, realized_pattern)
# NOTE: we keep movement ops on top of the buffer view
is_pattern_uop(c.lazydata, UPat(Ops.BUFFER))
is_pattern_uop(d.lazydata, UPat(Ops.RESHAPE, src=(realized_pattern,)))
is_pattern_uop(d.lazydata, UPat(Ops.VIEW, src=(realized_pattern,)))
def test_reshape_is_same_child(self):
a = Tensor([1,2,3])