realized base tensors become RESHAPE(BUFFER) [pr] (#8994)

This commit is contained in:
qazal
2025-02-10 10:17:54 +01:00
committed by GitHub
parent 910ae260cd
commit fd9f9ec772
5 changed files with 17 additions and 16 deletions

View File

@@ -2496,7 +2496,7 @@ class TestUOpBecome(unittest.TestCase):
# NOTE: realized base is always a flat buffer
assert UPat(Ops.BUFFER).match(add.lazydata.base, {})
# the Tensor UOp can optionally stack a VIEW on top of BUFFER
assert UPat(Ops.VIEW, src=(UPat(Ops.BUFFER),)).match(add.lazydata, {})
assert UPat(Ops.RESHAPE, src=(UPat(Ops.BUFFER),)).match(add.lazydata, {})
def test_new_buffer_view(self):
a = Tensor.empty(4, 4)