--- test/test_jit.py.orig 2026-04-18 22:16:10 UTC +++ test/test_jit.py @@ -375,6 +375,10 @@ class TestJitProfiler(JitTestCase): self.graph_executor_optimize_opt ) + @unittest.skipIf( + sys.platform.startswith("freebsd"), + "Hangs on FreeBSD due to profiler/JIT interaction deadlock", + ) def test_profiler(self): torch._C._set_graph_executor_optimize(False) @@ -1832,6 +1836,10 @@ graph(%Ra, %Rb): @slowTest @unittest.skipIf(GRAPH_EXECUTOR != ProfilingMode.LEGACY, 'Testing differentiable graph') + @unittest.skipIf( + GRAPH_EXECUTOR == ProfilingMode.LEGACY, + "Hangs in legacy executor mode due to profiler/JIT interaction", + ) def test_dropout_module_requires_grad(self): with enable_profiling_mode_for_profiling_tests(): class MyModule(torch.nn.Module): @@ -1875,6 +1883,10 @@ graph(%Ra, %Rb): @unittest.skipIf(GRAPH_EXECUTOR == ProfilingMode.SIMPLE, 'Testing differentiable graph') @skipIfTorchDynamo("Torchdynamo cannot correctly handle profiler.profile calls") + @unittest.skipIf( + sys.platform.startswith("freebsd"), + "Hangs on FreeBSD due to profiler/JIT interaction deadlock", + ) def test_dropout_func_requires_grad(self): def dropout_training(input): return F.dropout(input, 0.5, training=True)