automatic_dynamic_shapes is on by default (#106188)

Signed-off-by: Edward Z. Yang <ezyang@meta.com>

Pull Request resolved: https://github.com/pytorch/pytorch/pull/106188
Approved by: https://github.com/albanD
This commit is contained in:
Edward Z. Yang 2023-07-27 23:13:20 -04:00 committed by PyTorch MergeBot
parent 2636751fb9
commit 0b8fbfe9de

View File

@ -2911,9 +2911,7 @@ def run(runner, args, original_dir=None):
if args.dynamic_batch_only:
args.dynamic_shapes = True
torch._dynamo.config.assume_static_by_default = True
torch._dynamo.config.automatic_dynamic_shapes = True
if args.dynamic_shapes:
torch._dynamo.config.automatic_dynamic_shapes = True
if not args.dynamic_batch_only:
torch._dynamo.config.assume_static_by_default = False
if args.specialize_int:
@ -2991,8 +2989,6 @@ def run(runner, args, original_dir=None):
}:
# some of the models do not support use_deterministic_algorithms
torch.use_deterministic_algorithms(True)
if args.only in {"hf_T5_generate"}:
torch._dynamo.config.automatic_dynamic_shapes = True
os.environ["CUBLAS_WORKSPACE_CONFIG"] = ":4096:8"
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.allow_tf32 = False