mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-06-24 02:14:17 +00:00
global rangeify
This commit is contained in:
parent
9a2f55425b
commit
efdf08f3e2
1 changed files with 3 additions and 0 deletions
|
|
@ -82,4 +82,7 @@ pm_rangeify = PatternMatcher([
|
|||
# move MAP through elementwise ALU
|
||||
(UPat(Ops.INDEX, src=(UPat(GroupOp.Elementwise.union({Ops.STORE})),), allow_any_len=True, name="x"),
|
||||
lambda x: x.src[0].replace(src=tuple([UOp(Ops.INDEX, dtype=s.dtype, src=(s,)+x.src[1:]) for s in x.src[0].src]))),
|
||||
|
||||
# CONST can't have axes
|
||||
(UPat(Ops.INDEX, src=(UPat(Ops.CONST,name="c"),)), lambda c: c),
|
||||
])
|
||||
Loading…
Add table
Add a link
Reference in a new issue