From b41761488d4327edeb644d2cfb0322d2e96c850a Mon Sep 17 00:00:00 2001 From: Caleb Bunch <100161536+CalebBunch@users.noreply.github.com> Date: Sat, 24 Feb 2024 07:51:39 -0500 Subject: [PATCH] change specific string 'CLANG' to DEVICE variable in abstractions2.py (#3488) --- docs/abstractions2.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/abstractions2.py b/docs/abstractions2.py index 5d62848f04..9563a3b4cc 100644 --- a/docs/abstractions2.py +++ b/docs/abstractions2.py @@ -76,10 +76,10 @@ from tinygrad.lazy import LazyBuffer, LoadOps from tinygrad.realize import run_schedule, create_schedule # allocate some values + load in values -a = LazyBuffer.loadop(LoadOps.EMPTY, (1,), dtypes.int32, "CLANG") -b = LazyBuffer.loadop(LoadOps.EMPTY, (1,), dtypes.int32, "CLANG") -a.realized = Buffer("CLANG", 1, dtypes.int32).copyin(memoryview(bytearray(struct.pack("I", 2)))) -b.realized = Buffer("CLANG", 1, dtypes.int32).copyin(memoryview(bytearray(struct.pack("I", 3)))) +a = LazyBuffer.loadop(LoadOps.EMPTY, (1,), dtypes.int32, DEVICE) +b = LazyBuffer.loadop(LoadOps.EMPTY, (1,), dtypes.int32, DEVICE) +a.realized = Buffer(DEVICE, 1, dtypes.int32).copyin(memoryview(bytearray(struct.pack("I", 2)))) +b.realized = Buffer(DEVICE, 1, dtypes.int32).copyin(memoryview(bytearray(struct.pack("I", 3)))) # describe the computation out = a.e(BinaryOps.ADD, b)