diff --git a/test/registered/profiling/test_start_profile.py b/test/registered/profiling/test_start_profile.py index df7fd579a..10b8b31d8 100644 --- a/test/registered/profiling/test_start_profile.py +++ b/test/registered/profiling/test_start_profile.py @@ -19,7 +19,7 @@ import unittest import requests from sglang.srt.environ import envs -from sglang.srt.utils import kill_process_tree +from sglang.srt.utils import is_hip, kill_process_tree from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci from sglang.test.test_utils import ( DEFAULT_SMALL_MODEL_NAME_FOR_TEST, @@ -51,10 +51,17 @@ class TestStartProfile(CustomTestCase): envs.SGLANG_TORCH_PROFILER_DIR.set(OUTPUT_DIR) cls.model = DEFAULT_SMALL_MODEL_NAME_FOR_TEST cls.base_url = DEFAULT_URL_FOR_TEST + # ROCm's HIP runtime can deadlock inside hipGraphLaunch while a + # torch-profiler (rocprofiler-sdk) session is attached, wedging the + # scheduler in at::cuda::CUDAGraph::replay until the watchdog kills the + # server. These tests cover the /start_profile request surface rather + # than graph replay, so run them eagerly on HIP. + other_args = ["--disable-cuda-graph"] if is_hip() else [] cls.process = popen_launch_server( cls.model, cls.base_url, timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH, + other_args=other_args, ) @classmethod