From a17ea53340d4430b7df3ceda2f6405357af3ff8e Mon Sep 17 00:00:00 2001 From: qazal <77887910+Qazalin@users.noreply.github.com> Date: Thu, 12 Sep 2024 07:45:31 +0800 Subject: [PATCH] delete USE_COPY_KERNEL from the scheduler [run_process_replay] (#6482) --- tinygrad/engine/schedule.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tinygrad/engine/schedule.py b/tinygrad/engine/schedule.py index b778bf47a4..aab5d351a6 100644 --- a/tinygrad/engine/schedule.py +++ b/tinygrad/engine/schedule.py @@ -90,7 +90,6 @@ def _recursive_uop(buf:LazyBuffer, st:ShapeTracker, outputs:Tuple[LazyBuffer, .. if buf.op is UnaryOps.BITCAST: return cache.setdefault((buf, st), UOp(UOps.BITCAST, dtype, in_uops)) return cache.setdefault((buf, st), UOp(UOps.ALU, dtype, in_uops, buf.op)) - # ** AST graph rewrite: UOp with SWIZZLE (movementops) -> UOp we can index ** # ***** helpers for doing movementops on uops ***** @@ -162,12 +161,7 @@ reduceop_fusor = PatternMatcher([ def _lower_lazybuffer(outs:List[LazyBuffer], realizes:Dict[LazyBuffer, None]) -> LBScheduleItem: """describe the computation for a LazyBuffer with UOp + inputs + var_vals""" - if (out:=outs[0]).op is MetaOps.COPY and getenv("USE_COPY_KERNEL") and out.device.split(":")[0] == out.srcs[0].device.split(":")[0]: - st_uop = ShapeTracker.from_shape(out.arg).to_uop() - rd = UOp(UOps.LOAD, dtypes.uint8, (UOp(UOps.DEFINE_GLOBAL, PtrDType(dtypes.uint8), (), 1), st_uop)) - wr = UOp(UOps.STORE, dtypes.void, (UOp(UOps.DEFINE_GLOBAL, PtrDType(out.dtype), (), 0), st_uop, rd)) - return LBScheduleItem(UOp(UOps.SINK, dtypes.void, (wr,)), outs, [x.base for x in out.srcs]) - if out.op in {MetaOps.CUSTOM, MetaOps.COPY, MetaOps.EMPTY, MetaOps.VIEW}: + if (out:=outs[0]).op in {MetaOps.CUSTOM, MetaOps.COPY, MetaOps.EMPTY, MetaOps.VIEW}: return LBScheduleItem(UOp(UOps.EXT, out.dtype, (), (out.op, out.arg)), outs, [x.base for x in out.srcs]) # create the stores var_vals = merge_dicts([out.st.var_vals.copy() for out in outs])