[AMD] ci: add label-gated extra-a tier (kv_canary + mock_model unit tests) (#27822)

This commit is contained in:
Michael
2026-06-12 15:12:56 -07:00
committed by GitHub
parent 95867f0932
commit 54989b1fd0
25 changed files with 263 additions and 21 deletions
@@ -12,11 +12,12 @@ from sglang.srt.model_executor.forward_batch_info import (
ForwardMode,
_stable_hash_str_to_i64,
)
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.mock_model.utils import mock_model_server_args, mock_model_server_env
from sglang.test.test_utils import CustomTestCase
register_cuda_ci(est_time=60, stage="extra-a", runner_config="1-gpu-small")
register_amd_ci(est_time=60, suite="extra-a-test-1-gpu-small-amd")
@dataclasses.dataclass
@@ -9,10 +9,11 @@ os.environ["SGLANG_KV_CANARY_ENABLE_TOKEN_ORACLE"] = "1"
from sglang.srt.kv_canary.token_oracle.install import install_token_oracle_from_env
from sglang.srt.kv_canary.token_oracle.oracle import HashOracle
from sglang.srt.layers.sampler import _CUSTOM_SAMPLER_FACTORIES
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 CustomTestCase
register_cuda_ci(est_time=60, stage="extra-a", runner_config="1-gpu-small")
register_amd_ci(est_time=60, suite="extra-a-test-1-gpu-small-amd")
def _make_server_args(*, sampling_backend: str) -> SimpleNamespace:
@@ -10,10 +10,11 @@ from sglang.srt.kv_canary.token_oracle.oracle import (
HashOracle,
_splitmix64_tensor,
)
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 CustomTestCase
register_cuda_ci(est_time=60, stage="extra-a", runner_config="1-gpu-small")
register_amd_ci(est_time=60, suite="extra-a-test-1-gpu-small-amd")
_U64_MASK: int = (1 << 64) - 1
@@ -7,10 +7,11 @@ import torch
from sglang.jit_kernel.kv_canary.verify_ref import splitmix64
from sglang.srt.kv_canary.token_oracle.oracle import HashOracle
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 CustomTestCase
register_cuda_ci(est_time=30, stage="extra-a", runner_config="1-gpu-small")
register_amd_ci(est_time=30, suite="extra-a-test-1-gpu-small-amd")
class TestHashOracleTorchVsRef(CustomTestCase):
@@ -18,10 +18,11 @@ from sglang.srt.kv_canary.token_oracle.oracle import HashOracle
from sglang.srt.kv_canary.token_oracle.sampler import install_oracle_sampler
from sglang.srt.layers.sampler import _CUSTOM_SAMPLER_FACTORIES
from sglang.srt.server_args import SAMPLING_BACKEND_CHOICES
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 CustomTestCase
register_cuda_ci(est_time=60, stage="extra-a", runner_config="1-gpu-small")
register_amd_ci(est_time=60, suite="extra-a-test-1-gpu-small-amd")
class TestInstallOracleSampler(CustomTestCase):