From 2f4af0f4e683bc2e76301f6738eca57fa540af98 Mon Sep 17 00:00:00 2001 From: Shivam Raikundalia Date: Fri, 25 Oct 2024 00:25:49 +0000 Subject: [PATCH] [Profiler] Disable Dynamo-Sensitive Profiler Tests (#138762) Summary: During compilation, a profiler context gets ignored so we should temporarily turn off tests that are failing due to dynamo. Once profiler integration with dynamo is introduced we can reintroduce these tests Test Plan: Make sure CI is passing again Differential Revision: D64867447 Pull Request resolved: https://github.com/pytorch/pytorch/pull/138762 Approved by: https://github.com/davidberard98 --- test/profiler/test_execution_trace.py | 1 + test/profiler/test_profiler.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/test/profiler/test_execution_trace.py b/test/profiler/test_execution_trace.py index 855db184dc2..da52d17845c 100644 --- a/test/profiler/test_execution_trace.py +++ b/test/profiler/test_execution_trace.py @@ -121,6 +121,7 @@ class TestExecutionTrace(TestCase): @unittest.skipIf(not kineto_available(), "Kineto is required") @skipIfHpu + @skipIfTorchDynamo("profiler gets ignored if dynamo activated") def test_execution_trace_with_kineto(self, device): trace_called_num = 0 diff --git a/test/profiler/test_profiler.py b/test/profiler/test_profiler.py index cd05a18ef84..ba9cbd79bb8 100644 --- a/test/profiler/test_profiler.py +++ b/test/profiler/test_profiler.py @@ -337,6 +337,7 @@ class TestProfiler(TestCase): ) @serialTest() @parametrize("work_in_main_thread", [True, False]) + @skipIfTorchDynamo("profiler gets ignored if dynamo activated") def test_source_multithreaded(self, name, thread_spec, work_in_main_thread): """Test various threading configurations. @@ -1452,6 +1453,7 @@ class TestProfiler(TestCase): @patch.dict(os.environ, {"KINETO_USE_DAEMON": "1"}) @patch.dict(os.environ, {"KINETO_DAEMON_INIT_DELAY_S": "1"}) + @skipIfTorchDynamo("profiler gets ignored if dynamo activated") def test_kineto_profiler_with_environment_variable(self): script = """ import torch