single arange fusion with graph rewrite (#6160)

This commit is contained in:
qazal
2024-08-26 18:18:16 +08:00
committed by GitHub
parent b4381e9777
commit 067aeaeb2f

View File

@@ -188,7 +188,7 @@ def push_reduceop_shape(root:UOp) -> Optional[UOp]:
reduceop_fusor = PatternMatcher([
(UPat(UOps.REDUCE_AXIS, src=(UPat(name="rsrc"), UPat(UOps.SWIZZLE, src=(UPat(name="swizzle"),))), name="root"), apply_swizzle),
(UPat(UOps.STORE, name="root"), push_reduceop_shape),
(UPat({UOps.ALU, UOps.CAST, UOps.BITCAST, UOps.STORE}, name="root"), push_reduceop_shape),
])
def _lower_lazybuffer(outs:List[LazyBuffer], realizes:Dict[LazyBuffer, None]) -> LBScheduleItem: