mirror of
https://github.com/tinygrad/tinygrad.git
synced 2026-04-29 03:00:14 -04:00
remove movementops in viz graph rewrite [pr] (#8665)
This commit is contained in:
@@ -520,8 +520,8 @@ remove_movement_ops = PatternMatcher([
|
||||
@track_rewrites(named=True)
|
||||
def create_schedule_with_vars(outs:list[UOp], skip_check:bool=not __debug__) -> tuple[list[ScheduleItem], dict[Variable, int], dict[UOp, UOp]]:
|
||||
big_sink = UOp.sink(*outs)
|
||||
# if using VIZ, do an empty graph rewrite to vizualize the Tensor graph
|
||||
if getenv("VIZ"): graph_rewrite(big_sink, PatternMatcher([]))
|
||||
# if using VIZ, do a graph rewrite to vizualize the Tensor graph
|
||||
if getenv("VIZ"): graph_rewrite(big_sink, remove_movement_ops)
|
||||
if not skip_check: type_verify(list(big_sink.toposort), tensor_uop_spec)
|
||||
# to_uop is removing (many) of the movement ops
|
||||
sink = add_buffers(big_sink, ctx:=ScheduleContext(), cache={})
|
||||
|
||||
Reference in New Issue
Block a user