Revert "CONST(VIEW(DEVICE)) (#8365)" (#8372)

This reverts commit 83284985f0.
This commit is contained in:
qazal
2024-12-22 04:44:34 +02:00
committed by GitHub
parent 83284985f0
commit 514a6740e4
4 changed files with 22 additions and 17 deletions

View File

@@ -3,7 +3,7 @@ from tinygrad import Tensor
from tinygrad.ops import UPat, Ops
realized_pattern = UPat(Ops.VIEW, src=(UPat(Ops.BUFFER),))
const_pattern = UPat(Ops.CONST, src=(UPat(Ops.VIEW, src=(UPat(Ops.DEVICE),))))
const_pattern = UPat(Ops.VIEW, src=(UPat(Ops.DEVICE), UPat(Ops.CONST)))
def is_pattern(ten:Tensor, pat:UPat): assert pat.match(ten.lazydata, {})
class TestTensorUopRepresentation(unittest.TestCase):