From d2b3e9051dea26181c9b388fd9862f9f81fd7b57 Mon Sep 17 00:00:00 2001 From: Bingxu Chen Date: Thu, 27 Aug 2026 09:44:10 +0800 Subject: [PATCH] [AMD][CI] Stabilize PyTorch sampling backend test on ROCm (#36307) --- test/registered/sampling/test_pytorch_sampling_backend.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/registered/sampling/test_pytorch_sampling_backend.py b/test/registered/sampling/test_pytorch_sampling_backend.py index ba4019db2..d0d804a12 100644 --- a/test/registered/sampling/test_pytorch_sampling_backend.py +++ b/test/registered/sampling/test_pytorch_sampling_backend.py @@ -3,7 +3,7 @@ from types import SimpleNamespace import requests -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.run_eval import run_eval from sglang.test.test_utils import ( @@ -24,11 +24,15 @@ class TestPyTorchSamplingBackend(CustomTestCase): def setUpClass(cls): cls.model = DEFAULT_MODEL_NAME_FOR_TEST cls.base_url = DEFAULT_URL_FOR_TEST + other_args = ["--sampling-backend", "pytorch", "--disable-radix-cache"] + if is_hip(): + other_args.extend(["--max-running-requests", "64"]) + cls.process = popen_launch_server( cls.model, cls.base_url, timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH, - other_args=["--sampling-backend", "pytorch", "--disable-radix-cache"], + other_args=other_args, ) @classmethod