move assign logic into lazy.py (#3984)

* move assign logic into lazy.py

* don't check the buffer
This commit is contained in:
George Hotz
2024-03-28 20:26:38 -07:00
committed by GitHub
parent 3fee689ded
commit 1bf0a7a2d1
4 changed files with 10 additions and 9 deletions

View File

@@ -81,6 +81,8 @@ a = LazyBuffer.loadop(LoadOps.EMPTY, (1,), dtypes.int32, DEVICE)
b = LazyBuffer.loadop(LoadOps.EMPTY, (1,), dtypes.int32, DEVICE)
a.buffer.allocate().copyin(memoryview(bytearray(struct.pack("I", 2))))
b.buffer.allocate().copyin(memoryview(bytearray(struct.pack("I", 3))))
del a.srcs
del b.srcs
# describe the computation
out = a.e(BinaryOps.ADD, b)