[easy] Fix test_dynamo_timed (#151816)

Summary: The structured logging counter is a global that might have been affected by earlier tests. Clear it explicitly.
Fixes #148093

Test Plan: `pytest test/dynamo/test_utils.py`

Pull Request resolved: https://github.com/pytorch/pytorch/pull/151816
Approved by: https://github.com/ppanchalia
This commit is contained in:
Sam Larsen 2025-04-21 11:51:30 -07:00 committed by PyTorch MergeBot
parent b3b1616560
commit 80a3877b3d

View File

@ -174,6 +174,7 @@ class TestDynamoTimed(TestCase):
add(torch.rand([10]), torch.rand([10]))
utils.reset_frame_count()
torch._logging._internal.structured_logging_overhead.clear()
@dynamo_config.patch(
{