diff --git a/test/test_cuda.py b/test/test_cuda.py index b425c036597e6..07489c9f1cfc1 100644 --- a/test/test_cuda.py +++ b/test/test_cuda.py @@ -4653,6 +4653,7 @@ def forward(self, x): return x try: + torch._dynamo.reset() torch.cuda.memory.empty_cache() input_tensor = torch.randn(1, 10, device="cuda") # Create an instance of the model