Skip to content

Commit f3311ea

Browse files
committed
Revert an unrelated change
1 parent b6e6af2 commit f3311ea

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

thunder/dynamo/compiler.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ def __call__(self, gm: torch.fx.GraphModule, sample_args: list[torch.SymInt, tor
134134

135135
remove_empty_autocast(gm)
136136

137+
# Dynamo uses lazy generation of the underlying Python code, so we need to
138+
# force recompilation of the GraphModule before passing it to Thunder.
139+
recompile_graph(gm)
140+
137141
# The whole graph may not be supported by `thunder`, so we split it in `thunder` supported sections
138142
# and unsupported sections which are passed to `torch.compile(backend='inductor')`
139143
thunder_options = _with_prologue_pruning_transform(

0 commit comments

Comments
 (0)