mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-29 03:00:14 -04:00
remove const normalization in indexing [pr] (#14989)
rangeify can create const with device, and all is normalized in to_define_global
This commit is contained in:
@@ -118,8 +118,6 @@ pm_apply_rangeify = PatternMatcher([
|
||||
(UPat(GroupOp.All, name="x"), create_bufferize_and_index_based_on_ranges),
|
||||
# remove movement op
|
||||
(UPat(GroupOp.Movement, name="x"), remove_movement_op_after_rangeify),
|
||||
# const/define_var shouldn't have src
|
||||
(UPat((Ops.CONST, Ops.DEFINE_VAR), name="c"), lambda ctx,c: c.replace(src=()) if c in ctx.range_map else None),
|
||||
])
|
||||
|
||||
@functools.cache
|
||||
|
||||
Reference in New Issue
Block a user