Skip to content

Commit ec67c18

Browse files
committed
Revert an unrelated change
1 parent 8778e40 commit ec67c18

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
@@ -135,6 +135,10 @@ def __call__(self, gm: torch.fx.GraphModule, sample_args: list[torch.SymInt, tor
135135

136136
remove_empty_autocast(gm)
137137

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

0 commit comments

Comments
 (0)