replace lazy srcs with the new uop api [pr] (#8255)

* buf_uop_view function

* srcs shouldn't exist

* fix TestTensorMetadata

---------

Co-authored-by: George Hotz <geohot@gmail.com>
This commit is contained in:
qazal
2024-12-15 11:09:54 +02:00
committed by GitHub
parent e0aeb2e9f4
commit d05e21cb69
5 changed files with 9 additions and 14 deletions

View File

@@ -84,8 +84,8 @@ a = UOp.metaop(Ops.EMPTY, (1,), dtypes.int32, DEVICE)
b = UOp.metaop(Ops.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
a = a.buf_uop_view()
b = b.buf_uop_view()
# describe the computation
out = a.alu(Ops.ADD, b)