From cf525f603f2d0c1596385727dc4a8f8b065da60f Mon Sep 17 00:00:00 2001 From: Animesh Jain Date: Mon, 29 Apr 2024 16:58:02 -0700 Subject: [PATCH] [dynamo] use lazy disable dynamo for manual seed (#125196) Pull Request resolved: https://github.com/pytorch/pytorch/pull/125196 Approved by: https://github.com/fegin, https://github.com/yanboliang --- torch/_dynamo/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torch/_dynamo/__init__.py b/torch/_dynamo/__init__.py index 05d58662da7949..b1e970e57d6fb2 100644 --- a/torch/_dynamo/__init__.py +++ b/torch/_dynamo/__init__.py @@ -61,7 +61,7 @@ # Wrap manual_seed with the disable decorator. # Can't do it at its implementation due to dependency issues. - torch.manual_seed = disable(torch.manual_seed) + torch.manual_seed = torch._disable_dynamo(torch.manual_seed) # Add the new manual_seed to the builtin registry. torch.jit._builtins._register_builtin(torch.manual_seed, "aten::manual_seed")