Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions autoparallel/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,10 @@ def build_model_graph(self):
# we basically want to remove noops in here
prev = torch._inductor.config.pattern_matcher
torch._inductor.config.pattern_matcher = False
gm = joint_graph_passes(gm)
torch._inductor.config.pattern_matcher = prev
try:
gm = joint_graph_passes(gm)
finally:
torch._inductor.config.pattern_matcher = prev
remove_assert_ops(gm.graph)
gm.graph.eliminate_dead_code()
gm.recompile()
Expand Down