From 53f0b8e0e8aed42d566b53e99f9ba620958317f4 Mon Sep 17 00:00:00 2001 From: Jason Ansel Date: Wed, 30 Mar 2022 18:20:38 -0700 Subject: [PATCH 1/5] Fix torchbench.py --nothing option --- torchbench.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/torchbench.py b/torchbench.py index 9a06b11eab..9b686d30ba 100755 --- a/torchbench.py +++ b/torchbench.py @@ -907,7 +907,8 @@ def main(): output_csv(output_filename, [], [device, name, 0.0]) print_summary(output_filename) else: - os.path.exists(output_filename) and os.unlink(output_filename) + if output_filename and os.path.exists(output_filename): + os.unlink(output_filename) for device, name, model, example_inputs in iter_models(args): torchdynamo.reset() gc.collect() From f7b68d0d79f394967dafac3395c83f106559cce9 Mon Sep 17 00:00:00 2001 From: Jason Ansel Date: Wed, 30 Mar 2022 18:30:10 -0700 Subject: [PATCH 2/5] Skip tacotron2 in torchbench.py --- torchbench.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/torchbench.py b/torchbench.py index 9a06b11eab..7f86d382aa 100755 --- a/torchbench.py +++ b/torchbench.py @@ -55,9 +55,8 @@ SKIP = { # non-deterministic output / cant check correctness "pyhpc_turbulent_kinetic_energy", - # CUDA torchvision::nms build issues on AWS cluser - "detectron2_maskrcnn", - "vision_maskrcnn", + # https://github.com/facebookresearch/torchdynamo/issues/82 + "tacotron2", } # Additional models that are skipped in training From d72ff46029cfbead357a6ce677e0e5ee13f1b836 Mon Sep 17 00:00:00 2001 From: Jason Ansel Date: Wed, 30 Mar 2022 19:19:21 -0700 Subject: [PATCH 3/5] revert --- torchbench.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/torchbench.py b/torchbench.py index f374d247d7..122100c7f3 100755 --- a/torchbench.py +++ b/torchbench.py @@ -908,8 +908,7 @@ def main(): output_csv(output_filename, [], [device, name, 0.0]) print_summary(output_filename) else: - if output_filename and os.path.exists(output_filename): - os.unlink(output_filename) + os.path.exists(output_filename) and os.unlink(output_filename) for device, name, model, example_inputs in iter_models(args): torchdynamo.reset() gc.collect() From 27270b38c4c8fd23d07eb91b097e2f9586a968e8 Mon Sep 17 00:00:00 2001 From: Jason Ansel Date: Wed, 30 Mar 2022 22:07:54 -0700 Subject: [PATCH 4/5] Fix --nothing --- torchbench.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/torchbench.py b/torchbench.py index 122100c7f3..f374d247d7 100755 --- a/torchbench.py +++ b/torchbench.py @@ -908,7 +908,8 @@ def main(): output_csv(output_filename, [], [device, name, 0.0]) print_summary(output_filename) else: - os.path.exists(output_filename) and os.unlink(output_filename) + if output_filename and os.path.exists(output_filename): + os.unlink(output_filename) for device, name, model, example_inputs in iter_models(args): torchdynamo.reset() gc.collect() From b77e6e9f78a4a146767b63fdbfe6db183264b196 Mon Sep 17 00:00:00 2001 From: Animesh Jain Date: Wed, 6 Apr 2022 04:12:38 +0000 Subject: [PATCH 5/5] Using low overhead version of AOT Module --- torchdynamo/optimizations/backends.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/torchdynamo/optimizations/backends.py b/torchdynamo/optimizations/backends.py index aa1fa907f3..4866230901 100644 --- a/torchdynamo/optimizations/backends.py +++ b/torchdynamo/optimizations/backends.py @@ -511,9 +511,9 @@ def _wrapped_bw_compiler(*args, **kwargs): bw_compiler = kwargs.get("bw_compiler") or kwargs["fw_compiler"] kwargs["bw_compiler"] = _wrapped_bw_compiler - from functorch.compile import aot_module + from functorch.compile import aot_module_simplified - return subgraph.wrap_returns(aot_module(subgraph.model, **kwargs)) + return aot_module_simplified(subgraph.model, **kwargs) def tvm_compile(jit_mod, example_inputs, log_file=None, **kwargs):