From 3acd8559f458a11fefb47b595f68e4e310d0c8f5 Mon Sep 17 00:00:00 2001 From: chenyu Date: Fri, 19 Jul 2024 17:06:15 -0400 Subject: [PATCH] doc: variable names in abstractions2.py (#5591) --- docs/abstractions2.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/abstractions2.py b/docs/abstractions2.py index e607c672f7..5f3bc75499 100644 --- a/docs/abstractions2.py +++ b/docs/abstractions2.py @@ -53,15 +53,15 @@ ld_1 = LazyOp(BufferOps.LOAD, (), MemBuffer(1, dtypes.int32, ShapeTracker.from_s ld_2 = LazyOp(BufferOps.LOAD, (), MemBuffer(2, dtypes.int32, ShapeTracker.from_shape((1,)))) alu = LazyOp(BinaryOps.ADD, (ld_1, ld_2)) st_0 = LazyOp(BufferOps.STORE, (alu,), MemBuffer(0, dtypes.int32, ShapeTracker.from_shape((1,)))) -sink = LazyOp(MetaOps.KERNEL, (st_0,)) +k = LazyOp(MetaOps.KERNEL, (st_0,)) # convert the computation to a "linearized" format (print the format) from tinygrad.engine.realize import get_kernel, CompiledRunner -lin = get_kernel(Device[DEVICE].renderer, sink).linearize() -lin.uops.print() +kernel = get_kernel(Device[DEVICE].renderer, k).linearize() +kernel.uops.print() # compile a program (and print the source) -fxn = CompiledRunner(lin.to_program()) +fxn = CompiledRunner(kernel.to_program()) print(fxn.p.src) # NOTE: fxn.clprg is the ClangProgram