[AMD] ci: register 5 framework tests to run on AMD CI (#25208)
Co-authored-by: HAI <hixiao@gmail.com>
This commit is contained in:
@@ -14,13 +14,14 @@ import unittest
|
|||||||
import psutil
|
import psutil
|
||||||
|
|
||||||
import sglang as sgl
|
import sglang as sgl
|
||||||
from sglang.test.ci.ci_register import register_cuda_ci
|
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||||
from sglang.test.test_utils import (
|
from sglang.test.test_utils import (
|
||||||
DEFAULT_SMALL_MODEL_NAME_FOR_TEST,
|
DEFAULT_SMALL_MODEL_NAME_FOR_TEST,
|
||||||
CustomTestCase,
|
CustomTestCase,
|
||||||
)
|
)
|
||||||
|
|
||||||
register_cuda_ci(est_time=77, stage="base-b", runner_config="1-gpu-small")
|
register_cuda_ci(est_time=77, stage="base-b", runner_config="1-gpu-small")
|
||||||
|
register_amd_ci(est_time=77, suite="stage-b-test-1-gpu-small-amd")
|
||||||
|
|
||||||
|
|
||||||
class TestEngineChildPids(CustomTestCase):
|
class TestEngineChildPids(CustomTestCase):
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ from sglang.srt.observability.trace import (
|
|||||||
)
|
)
|
||||||
from sglang.srt.utils import kill_process_tree
|
from sglang.srt.utils import kill_process_tree
|
||||||
from sglang.srt.utils.network import get_zmq_socket
|
from sglang.srt.utils.network import get_zmq_socket
|
||||||
from sglang.test.ci.ci_register import register_cuda_ci
|
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||||
from sglang.test.test_utils import (
|
from sglang.test.test_utils import (
|
||||||
DEFAULT_SMALL_MODEL_NAME_FOR_TEST,
|
DEFAULT_SMALL_MODEL_NAME_FOR_TEST,
|
||||||
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
||||||
@@ -47,6 +47,7 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
# CI registration
|
# CI registration
|
||||||
register_cuda_ci(est_time=113, stage="extra-a", runner_config="1-gpu-small")
|
register_cuda_ci(est_time=113, stage="extra-a", runner_config="1-gpu-small")
|
||||||
|
register_amd_ci(est_time=113, suite="stage-b-test-1-gpu-small-amd")
|
||||||
|
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ import requests
|
|||||||
import torch
|
import torch
|
||||||
|
|
||||||
from sglang.srt.entrypoints.engine import Engine
|
from sglang.srt.entrypoints.engine import Engine
|
||||||
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_cuda_ci
|
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||||
from sglang.test.test_utils import (
|
from sglang.test.test_utils import (
|
||||||
DEFAULT_SMALL_MODEL_NAME_FOR_TEST,
|
DEFAULT_SMALL_MODEL_NAME_FOR_TEST,
|
||||||
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
||||||
@@ -28,6 +28,8 @@ from sglang.test.test_utils import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
register_cuda_ci(est_time=100, stage="base-b", runner_config="1-gpu-small")
|
register_cuda_ci(est_time=100, stage="base-b", runner_config="1-gpu-small")
|
||||||
|
register_amd_ci(est_time=100, suite="stage-b-test-1-gpu-small-amd")
|
||||||
|
|
||||||
|
|
||||||
_SEQCLS_MODEL = "Qwen/Qwen3-0.6B"
|
_SEQCLS_MODEL = "Qwen/Qwen3-0.6B"
|
||||||
_CAUSAL_LM_MODEL = DEFAULT_SMALL_MODEL_NAME_FOR_TEST
|
_CAUSAL_LM_MODEL = DEFAULT_SMALL_MODEL_NAME_FOR_TEST
|
||||||
@@ -183,6 +185,11 @@ class TestPooledHiddenStatesEngine(CustomTestCase):
|
|||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
@unittest.skipIf(
|
||||||
|
is_hip(),
|
||||||
|
"Multi-Item Scoring (enable_mis) requires the flashinfer prefill/decode "
|
||||||
|
"backend, which is NVIDIA-only.",
|
||||||
|
)
|
||||||
class TestPooledHiddenStatesMISEngine(CustomTestCase):
|
class TestPooledHiddenStatesMISEngine(CustomTestCase):
|
||||||
"""Validates return_pooled_hidden_states in MIS (delimiter) scoring mode.
|
"""Validates return_pooled_hidden_states in MIS (delimiter) scoring mode.
|
||||||
|
|
||||||
|
|||||||
@@ -13,9 +13,9 @@ import unittest
|
|||||||
import aiohttp
|
import aiohttp
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
from sglang.srt.utils import kill_process_tree
|
from sglang.srt.utils import is_hip, kill_process_tree
|
||||||
from sglang.srt.utils.hf_transformers_utils import get_tokenizer
|
from sglang.srt.utils.hf_transformers_utils import get_tokenizer
|
||||||
from sglang.test.ci.ci_register import register_cuda_ci
|
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||||
from sglang.test.test_utils import (
|
from sglang.test.test_utils import (
|
||||||
DEFAULT_SMALL_MODEL_NAME_FOR_TEST,
|
DEFAULT_SMALL_MODEL_NAME_FOR_TEST,
|
||||||
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
|
||||||
@@ -25,6 +25,7 @@ from sglang.test.test_utils import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
register_cuda_ci(est_time=87, stage="extra-a", runner_config="1-gpu-large")
|
register_cuda_ci(est_time=87, stage="extra-a", runner_config="1-gpu-large")
|
||||||
|
register_amd_ci(est_time=87, suite="stage-b-test-1-gpu-large-amd")
|
||||||
|
|
||||||
|
|
||||||
def remove_prefix(text: str, prefix: str) -> str:
|
def remove_prefix(text: str, prefix: str) -> str:
|
||||||
@@ -550,6 +551,14 @@ class TestSessionControl(CustomTestCase):
|
|||||||
outputs_from_session == outputs_normal
|
outputs_from_session == outputs_normal
|
||||||
), f"outputs_from_session: {outputs_from_session}, outputs_normal: {outputs_normal}"
|
), f"outputs_from_session: {outputs_from_session}, outputs_normal: {outputs_normal}"
|
||||||
|
|
||||||
|
@unittest.skipIf(
|
||||||
|
is_hip(),
|
||||||
|
"Session-branching produces a deterministic 1-token divergence from "
|
||||||
|
"plain generation on AMD (greedy temperature=0). The other 4 of 5 "
|
||||||
|
"branch outputs match exactly; passes on CUDA. Suspected ROCm "
|
||||||
|
"numerical-precision difference in the session KV-cache reuse path. "
|
||||||
|
"Re-enable when that divergence is fixed.",
|
||||||
|
)
|
||||||
def test_session_control_with_branching(self):
|
def test_session_control_with_branching(self):
|
||||||
root_prompt = "First, let me explain in one sentence about AI"
|
root_prompt = "First, let me explain in one sentence about AI"
|
||||||
chunks_per_step = [
|
chunks_per_step = [
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ test_streaming_session_extra.py.
|
|||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from sglang.test.ci.ci_register import register_cuda_ci
|
from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci
|
||||||
from sglang.test.kits.streaming_session_kit import (
|
from sglang.test.kits.streaming_session_kit import (
|
||||||
AbortLeakReproKitMixin,
|
AbortLeakReproKitMixin,
|
||||||
StreamingSessionKitMixin,
|
StreamingSessionKitMixin,
|
||||||
@@ -24,6 +24,7 @@ from sglang.test.test_utils import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
register_cuda_ci(est_time=691, stage="base-b", runner_config="1-gpu-large")
|
register_cuda_ci(est_time=691, stage="base-b", runner_config="1-gpu-large")
|
||||||
|
register_amd_ci(est_time=691, suite="stage-b-test-1-gpu-large-amd")
|
||||||
|
|
||||||
|
|
||||||
class TestStreamingSession(StreamingSessionServerBase, StreamingSessionKitMixin):
|
class TestStreamingSession(StreamingSessionServerBase, StreamingSessionKitMixin):
|
||||||
|
|||||||
Reference in New Issue
Block a user