hotfix: remove extra matcher for copy/buffer_view [pr] (#9157)

This commit is contained in:
qazal 2025-02-18 14:21:24 +02:00 committed by GitHub
commit 4f592eeea6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -353,8 +353,6 @@ def check_load_st(glbl:UOp, view:UOp):
fix_kernel_ops = PatternMatcher([
# BIND in shapetracker becomes DEFINE_VAR
(UPat(Ops.VIEW, name="x"), _append_st_vars),
# remove SINK from COPY and BUFFER_VIEW
(UPat(Ops.SINK, src=(UPat.store(UPat.var("b"), UPat(), UPat((Ops.COPY, Ops.BUFFER_VIEW), name="x")),)), lambda b,x: x.replace(src=(b, *x.src))),
# remove CONTIGUOUS/ASSIGN/DEVICE
(UPat(Ops.CONTIGUOUS, src=(UPat.var("x"),)), lambda x: x),
(UPat(Ops.ASSIGN, src=(UPat(), UPat.var("x"),)), lambda x: x),