Skip to content

Commit cadcb5d

Browse files
anijain2305pytorchmergebot
authored andcommitted
[inductor] disable compiler on the compiled_module_main (pytorch#155169)
Fixes pytorch#154536 Pull Request resolved: pytorch#155169 Approved by: https://github.com/jamesjwu, https://github.com/bdhirsh
1 parent 13ea0f2 commit cadcb5d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

torch/_inductor/wrapper_benchmark.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,9 @@ def collect_memory_snapshot(
397397
print(f"The collect memory snapshot has been written to {snapshot_path}")
398398

399399

400+
# With AOTAutograd cache, we directly call the compiled module. So prevent
401+
# Dynamo from reentering
402+
@torch.compiler.disable # type: ignore[misc]
400403
def compiled_module_main(
401404
benchmark_name: str, benchmark_compiled_module_fn: BenchmarkCallableType
402405
) -> None:

0 commit comments

Comments
 (0)