create_schedule([x.lazydata]) -> x.schedule() in tests (#8449)

This commit is contained in:
qazal
2024-12-30 21:15:52 +02:00
committed by GitHub
parent 0addbad36d
commit 866dfa1f23
23 changed files with 85 additions and 105 deletions

View File

@@ -77,7 +77,7 @@ assert out.as_buffer().cast('I')[0] == 5
print("******** third, the LazyBuffer ***********")
from tinygrad.engine.realize import run_schedule
from tinygrad.engine.schedule import create_schedule
from tinygrad.engine.schedule import create_schedule_with_vars
# allocate some values + load in values
a = UOp.metaop(Ops.EMPTY, (1,), dtypes.int32, DEVICE)
@@ -91,7 +91,7 @@ b = b.buf_uop_view()
out = a.alu(Ops.ADD, b)
# schedule the computation as a list of kernels
sched = create_schedule([out])
sched, _ = create_schedule_with_vars([out])
for si in sched: print(si.ast.op) # NOTE: the first two convert it to CLANG
# DEBUGGING: print the compute ast