Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

Commit 3df92a7

Browse files
committed
Aot Autograd - Dont fallback with new op
1 parent 4bb7125 commit 3df92a7

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

benchmarks/common.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ def set_model_name(name):
6868
"pytorch_struct",
6969
"speech_transformer",
7070
"vision_maskrcnn",
71-
"moco",
7271
# Huggingface
7372
"AlbertForMaskedLM", # OOM
7473
"AlbertForQuestionAnswering", # OOM

torchdynamo/optimizations/training.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ def is_aot_autograd_safe_to_run(gm, example_inputs):
3434
Issues
3535
1) LSTM - https://github.com/pytorch/torchdynamo/issues/1147
3636
2) LSTM - https://github.com/pytorch/functorch/issues/586
37-
3) New op - https://github.com/pytorch/torchdynamo/issues/1448
38-
4) Input mutation - https://github.com/pytorch/torchdynamo/issues/1301
37+
3) Input mutation - https://github.com/pytorch/torchdynamo/issues/1301
3938
"""
4039

4140
def raise_or_warn(reason):
@@ -53,11 +52,6 @@ def raise_or_warn(reason):
5352
if submod.__class__.__name__ == "LSTM":
5453
return raise_or_warn("LSTM")
5554

56-
# 2) new does not work with fake tensor and aot autograd
57-
for node in gm.graph.nodes:
58-
if node.op == "call_method" and node.target == "new":
59-
return raise_or_warn("new operator")
60-
6155
# 2) Mutation in the graph
6256
mutated = False
6357
try:

0 commit comments

Comments
 (0)