mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-09 15:08:02 -05:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user