mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-01-10 23:48:01 -05:00
remove gbarrier on const (#10656)
This commit is contained in:
@@ -537,6 +537,8 @@ finalize_gbarrier = PatternMatcher([
|
||||
(UPat((Ops.GBARRIER, Ops.CONTIGUOUS), src=(UPat(Ops.GBARRIER),), name="x"), lambda x: x.src[0]),
|
||||
# add contiguous to VIEW before GBARRIER
|
||||
(UPat(Ops.GBARRIER, src=(UPat(Ops.VIEW,),), name="x"), lambda x: x.src[0].contiguous().gbarrier()),
|
||||
# remove gbarrier on constants without a contiguous
|
||||
(UPat(Ops.GBARRIER, src=(UPat(Ops.CONST),), name="x"), lambda x: x.src[0]),
|
||||
])
|
||||
|
||||
remove_tags = PatternMatcher([(UPat(GroupOp.All, name="x"), lambda x: x.replace(tag=None) if x.tag is not None else None)])
|
||||
|
||||
Reference in New Issue
Block a user