From fd18d8f7fb5725c123153d5ca24bb14a31ab537e Mon Sep 17 00:00:00 2001 From: Shiwam Jaiswal Date: Wed, 15 Oct 2025 13:38:43 +0530 Subject: [PATCH] pass valid arg and source for Special Uop --- 20241112_pm.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/20241112_pm.md b/20241112_pm.md index b415c3c..c161f7b 100644 --- a/20241112_pm.md +++ b/20241112_pm.md @@ -295,7 +295,7 @@ from tinygrad.renderer.cstyle import MetalRenderer metal_renderer = MetalRenderer() const = UOp(Ops.CONST, dtypes.float, arg=1.0) define_global = UOp(Ops.DEFINE_GLOBAL, dtypes.float.ptr(), arg=0) -special = UOp(Ops.SPECIAL, dtypes.int, arg=('gidx0', 16), src=()) +special = UOp(Ops.SPECIAL, dtypes.int, arg='gidx0', src=(UOp.const(dtypes.int, 16),)) added = UOp(Ops.ADD, dtypes.long, arg=None, src=(define_global, special)) store = UOp(Ops.STORE, dtypes.void, arg=None, src=(added, const)) uops = [const, define_global, special, added, store] @@ -362,7 +362,7 @@ const = UOp(Ops.CONST, dtypes.float, arg=1.0) const_rewritten = matcher.rewrite(const) define_global = UOp(Ops.DEFINE_GLOBAL, dtypes.float.ptr(), arg=0) -special = UOp(Ops.SPECIAL, dtypes.int, arg=('gidx0', 16), src=()) +special = UOp(Ops.SPECIAL, dtypes.int, arg='gidx0', src=(UOp.const(dtypes.int, 16),)) added = UOp(Ops.ADD, dtypes.long, arg=None, src=(define_global, special)) store = UOp(Ops.STORE, dtypes.void, arg=None, src=(added, const_rewritten)) uops = [const_1, const_2, const_rewritten, define_global, special, added, store]