From 101fae3f35c6675459929e3bec62dc8dce8fc568 Mon Sep 17 00:00:00 2001 From: Peter Bell Date: Tue, 7 Nov 2023 04:52:50 -0800 Subject: [PATCH] Move ShapeEnv config out of dynamo (#112933) Summary: Previously there was a circular dependency between fx and dynamo that happened to work out since ShapeEnv didn't access the config at module init time. X-link: https://github.com/pytorch/pytorch/pull/112933 Approved by: https://github.com/ezyang Reviewed By: PaliC Differential Revision: D51057187 fbshipit-source-id: fc38e8f8c81d2ea0dc499859acdd1fd15688a19f --- userbenchmark/dynamo/dynamobench/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/userbenchmark/dynamo/dynamobench/common.py b/userbenchmark/dynamo/dynamobench/common.py index 4919a9dc1e..1528de1307 100644 --- a/userbenchmark/dynamo/dynamobench/common.py +++ b/userbenchmark/dynamo/dynamobench/common.py @@ -3390,7 +3390,7 @@ def run(runner, args, original_dir=None): args.repeat = 2 # Set translation validation on by default on CI accuracy runs. - torch._dynamo.config.translation_validation = True + torch.fx.experimental._config.translation_validation = True if args.dynamic_ci_skips_only: # Test only the incremental set of jobs whose skipped was @@ -3712,7 +3712,7 @@ def run(runner, args, original_dir=None): if args.no_translation_validation: # Overwrite 'translation_validation' config, if specified. - torch._dynamo.config.translation_validation = False + torch.fx.experimental._config.translation_validation = False experiment = functools.partial(experiment, args, runner.model_iter_fn)