From 2ea02f06420d427dbddc66d3f1af21bf493ea8bf Mon Sep 17 00:00:00 2001 From: Bingxu Chen Date: Tue, 20 Jan 2026 00:07:39 +0800 Subject: [PATCH] [AMD CI] Migrate and Add More Testcases (#17116) Co-authored-by: yctseng0211 --- .github/workflows/pr-test-amd.yml | 130 +++++++++++------- .../amd/test_deepseek_r1_mxfp4_8gpu.py | 2 +- test/registered/amd/test_deepseek_v3_basic.py | 84 +++++++++++ test/registered/amd/test_deepseek_v3_mtp.py | 116 ++++++++++++++++ .../attention/test_wave_attention_kernels.py | 2 +- test/registered/core/test_deterministic.py | 6 +- .../test_hicache_storage_3fs_backend.py | 3 +- .../test_hicache_storage_file_backend.py | 3 +- .../basic/test_serving_rerank.py | 2 +- test/registered/quant/test_awq_dequant.py | 2 +- .../quant/test_fused_rms_fp8_group_quant.py | 2 +- .../quant}/test_int4fp8_moe.py | 3 + .../rl/test_lora_load_from_tensor.py | 2 +- .../rotary}/test_rope_rocm.py | 3 + test/registered/test_srt_backend.py | 2 +- .../utils}/test_bench_typebaseddispatcher.py | 3 + .../utils}/test_type_based_dispatcher.py | 3 + test/run_suite.py | 2 +- test/srt/run_suite.py | 8 -- 19 files changed, 311 insertions(+), 67 deletions(-) create mode 100644 test/registered/amd/test_deepseek_v3_basic.py create mode 100644 test/registered/amd/test_deepseek_v3_mtp.py rename test/{srt => registered/quant}/test_int4fp8_moe.py (92%) rename test/{srt => registered/rotary}/test_rope_rocm.py (97%) rename test/{srt => registered/utils}/test_bench_typebaseddispatcher.py (98%) rename test/{srt => registered/utils}/test_type_based_dispatcher.py (98%) diff --git a/.github/workflows/pr-test-amd.yml b/.github/workflows/pr-test-amd.yml index 55c00d532..edfba8b11 100644 --- a/.github/workflows/pr-test-amd.yml +++ b/.github/workflows/pr-test-amd.yml @@ -149,7 +149,10 @@ jobs: docker exec -w /sglang-checkout/sgl-kernel/tests ci_sglang python3 -m pytest test_topk.py docker exec -w /sglang-checkout/sgl-kernel/tests ci_sglang python3 -m pytest test_kvcacheio.py docker exec -w /sglang-checkout/sgl-kernel/tests/sgl_diffusion ci_sglang python3 -m pytest test_timestep_embedding.py - + docker exec -w /sglang-checkout/sgl-kernel/tests ci_sglang python3 -m pytest test_moe_topk_sigmoid.py + docker exec -w /sglang-checkout/sgl-kernel/tests ci_sglang python3 -m pytest test_torch_defaults_reset.py + docker exec -w /sglang-checkout/sgl-kernel/tests ci_sglang python3 -m pytest test_amd_deterministic_custom_allreduce.py + docker exec -w /sglang-checkout/sgl-kernel/tests ci_sglang python3 -m pytest test_amd_nccl_allreduce_determinism.py # =============================================== primary ==================================================== stage-a-test-1-amd: @@ -190,7 +193,7 @@ jobs: - name: Run test timeout-minutes: 10 run: | - bash scripts/ci/amd_ci_exec.sh -w "/sglang-checkout/test" python3 run_suite.py --hw amd --suite stage-a-test-1 + bash scripts/ci/amd_ci_exec.sh -w "/sglang-checkout/test" python3 run_suite.py --hw amd --suite stage-a-test-1-amd stage-b-test-small-1-gpu-amd: needs: [check-changes, stage-a-test-1-amd] @@ -548,52 +551,13 @@ jobs: echo "=== Post-test System Memory Status ===" free -h - unit-test-backend-1-gpu-amd: - needs: [check-changes, stage-a-test-1-amd] + + stage-c-test-large-8-gpu-amd: + needs: [check-changes, call-gate, stage-b-test-small-1-gpu-amd, stage-b-test-large-2-gpu-amd] if: | always() && ( - (inputs.target_stage == 'unit-test-backend-1-gpu-amd') || - ( - !inputs.target_stage && - (!failure() && !cancelled()) && - ((needs.check-changes.outputs.main_package == 'true') || (needs.check-changes.outputs.sgl_kernel == 'true')) - ) - ) - strategy: - fail-fast: false - matrix: - runner: [linux-mi325-gpu-1] - part: [0, 1] - runs-on: ${{matrix.runner}} - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ inputs.pr_head_sha || inputs.ref || github.sha }} - - - name: Ensure VRAM is clear - run: bash scripts/ensure_vram_clear.sh rocm - - - name: Start CI container - run: bash scripts/ci/amd_ci_start_container.sh - env: - GITHUB_WORKSPACE: ${{ github.workspace }} - - - name: Install dependencies - run: bash scripts/ci/amd_ci_install_dependency.sh - - - name: Run test - timeout-minutes: 30 - run: | - bash scripts/ci/amd_ci_exec.sh python3 run_suite.py --suite per-commit-amd --auto-partition-id ${{ matrix.part }} --auto-partition-size 2 - - unit-test-backend-8-gpu-amd: - needs: [check-changes, stage-a-test-1-amd] - if: | - always() && - ( - (inputs.target_stage == 'unit-test-backend-8-gpu-amd') || + (inputs.target_stage == 'stage-c-test-large-8-gpu-amd') || ( !inputs.target_stage && (!failure() && !cancelled()) && @@ -634,7 +598,7 @@ jobs: - name: Run test timeout-minutes: 60 run: | - bash scripts/ci/amd_ci_exec.sh python3 run_suite.py --suite per-commit-8-gpu-amd --auto-partition-id ${{ matrix.part }} --auto-partition-size 2 --timeout-per-file 3600 + bash scripts/ci/amd_ci_exec.sh -w "/sglang-checkout/test" python3 run_suite.py --hw amd --suite stage-c-test-large-8-gpu-amd --auto-partition-id ${{ matrix.part }} --auto-partition-size 2 --timeout-per-file 3600 stage-c-test-large-8-gpu-amd-mi35x: needs: [check-changes, call-gate, stage-b-test-small-1-gpu-amd, stage-b-test-large-2-gpu-amd] @@ -721,6 +685,12 @@ jobs: run: | bash scripts/ci/amd_ci_exec.sh -w /sglang-checkout/test/registered/perf python3 -m unittest test_bench_serving_1gpu_part1.TestBenchServing1GPUPart1.test_online_latency_default + - name: Benchmark online latency (LoRA) + timeout-minutes: 10 + run: | + bash scripts/ci/amd_ci_exec.sh python3 -m unittest test_bench_serving.TestBenchServing.test_lora_online_latency + bash scripts/ci/amd_ci_exec.sh python3 -m unittest test_bench_serving.TestBenchServing.test_lora_online_latency_with_concurrent_adapter_updates + - name: Benchmark offline throughput timeout-minutes: 15 run: | @@ -780,6 +750,70 @@ jobs: run: | bash scripts/ci/amd_ci_exec.sh -w /sglang-checkout/test/registered/perf python3 -m unittest test_bench_serving_1gpu_large.TestBenchServing1GPULarge.test_offline_throughput_default_fp8 + - name: Benchmark VLM offline throughput + timeout-minutes: 10 + run: | + bash scripts/ci/amd_ci_exec.sh python3 -m unittest test_bench_serving.TestBenchServing.test_vlm_offline_throughput + + - name: Benchmark VLM online latency + timeout-minutes: 10 + run: | + bash scripts/ci/amd_ci_exec.sh python3 -m unittest test_bench_serving.TestBenchServing.test_vlm_online_latency + + performance-test-1-gpu-part-3-amd: + needs: [check-changes, stage-a-test-1-amd] + if: | + always() && + ( + (inputs.target_stage == 'performance-test-1-gpu-part-3-amd') || + ( + !inputs.target_stage && + (!failure() && !cancelled()) && + ((needs.check-changes.outputs.main_package == 'true') || (needs.check-changes.outputs.sgl_kernel == 'true')) + ) + ) + strategy: + fail-fast: false + matrix: + runner: [linux-mi325-gpu-1] + runs-on: ${{matrix.runner}} + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ inputs.pr_head_sha || inputs.ref || github.sha }} + + - name: Ensure VRAM is clear + run: bash scripts/ensure_vram_clear.sh rocm + + - name: Start CI container + run: bash scripts/ci/amd_ci_start_container.sh + env: + GITHUB_WORKSPACE: ${{ github.workspace }} + + - name: Install dependencies + run: bash scripts/ci/amd_ci_install_dependency.sh + + - name: Benchmark Scores online latency and throughput + timeout-minutes: 10 + run: | + bash scripts/ci/amd_ci_exec.sh python3 -m unittest test_bench_serving.TestBenchServing.test_score_api_latency_throughput + + - name: Benchmark Scores online latency and throughput (batch size scaling) + timeout-minutes: 10 + run: | + bash scripts/ci/amd_ci_exec.sh python3 -m unittest test_bench_serving.TestBenchServing.test_score_api_batch_scaling + + - name: Benchmark Embeddings online latency and throughput + timeout-minutes: 10 + run: | + bash scripts/ci/amd_ci_exec.sh python3 -m unittest test_bench_serving.TestBenchServing.test_embeddings_api_latency_throughput + + - name: Benchmark Embeddings online latency and throughput (batch size scaling) + timeout-minutes: 10 + run: | + bash scripts/ci/amd_ci_exec.sh python3 -m unittest test_bench_serving.TestBenchServing.test_embeddings_api_batch_scaling + performance-test-2-gpu-amd: needs: [check-changes, stage-a-test-1-amd] if: | @@ -942,11 +976,11 @@ jobs: stage-b-test-small-1-gpu-amd, stage-b-test-small-1-gpu-amd-mi35x, stage-b-test-large-2-gpu-amd, - unit-test-backend-1-gpu-amd, - unit-test-backend-8-gpu-amd, + stage-c-test-large-8-gpu-amd, stage-c-test-large-8-gpu-amd-mi35x, performance-test-1-gpu-part-1-amd, performance-test-1-gpu-part-2-amd, + performance-test-1-gpu-part-3-amd, performance-test-2-gpu-amd, accuracy-test-1-gpu-amd, accuracy-test-2-gpu-amd, diff --git a/test/registered/amd/test_deepseek_r1_mxfp4_8gpu.py b/test/registered/amd/test_deepseek_r1_mxfp4_8gpu.py index 2e88ed683..1851079ff 100644 --- a/test/registered/amd/test_deepseek_r1_mxfp4_8gpu.py +++ b/test/registered/amd/test_deepseek_r1_mxfp4_8gpu.py @@ -19,7 +19,7 @@ from sglang.test.test_utils import ( register_amd_ci(est_time=3600, suite="stage-c-test-large-8-gpu-amd-mi35x") DEEPSEEK_R1_MODEL_PATH = "amd/DeepSeek-R1-MXFP4-Preview" -SERVER_LAUNCH_TIMEOUT = 1200 +SERVER_LAUNCH_TIMEOUT = 1800 class TestDeepseekR1MXFP4(CustomTestCase): diff --git a/test/registered/amd/test_deepseek_v3_basic.py b/test/registered/amd/test_deepseek_v3_basic.py new file mode 100644 index 000000000..e87952c72 --- /dev/null +++ b/test/registered/amd/test_deepseek_v3_basic.py @@ -0,0 +1,84 @@ +import unittest +from types import SimpleNamespace + +from sglang.srt.utils import kill_process_tree +from sglang.test.ci.ci_register import register_amd_ci +from sglang.test.few_shot_gsm8k import run_eval as run_eval_few_shot_gsm8k +from sglang.test.send_one import BenchArgs, send_one_prompt +from sglang.test.test_utils import ( + DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH, + DEFAULT_URL_FOR_TEST, + CustomTestCase, + is_in_amd_ci, + is_in_ci, + popen_launch_server, + write_github_step_summary, +) + +register_amd_ci(est_time=952, suite="stage-c-test-large-8-gpu-amd") + +FULL_DEEPSEEK_V3_MODEL_PATH = "deepseek-ai/DeepSeek-V3-0324" + + +class TestDeepseekV3Basic(CustomTestCase): + @classmethod + def setUpClass(cls): + cls.model = FULL_DEEPSEEK_V3_MODEL_PATH + cls.base_url = DEFAULT_URL_FOR_TEST + other_args = [ + "--trust-remote-code", + "--tp", + "8", + "--model-loader-extra-config", + '{"enable_multithread_load": true, "num_threads": 64}', + ] + cls.process = popen_launch_server( + cls.model, + cls.base_url, + timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH * 5, + other_args=other_args, + ) + + @classmethod + def tearDownClass(cls): + kill_process_tree(cls.process.pid) + + def test_a_gsm8k( + self, + ): # Append an "a" to make this test run first (alphabetically) to warm up the server + args = SimpleNamespace( + num_shots=8, + data_path=None, + num_questions=1400, + parallel=1400, + max_new_tokens=512, + host="http://127.0.0.1", + port=int(self.base_url.split(":")[-1]), + ) + metrics = run_eval_few_shot_gsm8k(args) + print(f"{metrics=}") + + if is_in_ci(): + write_github_step_summary( + f"### test_gsm8k (deepseek-v3)\n" f'{metrics["accuracy"]=:.3f}\n' + ) + self.assertGreater(metrics["accuracy"], 0.935) + + def test_bs_1_speed(self): + args = BenchArgs(port=int(self.base_url.split(":")[-1]), max_new_tokens=2048) + acc_length, speed = send_one_prompt(args) + + print(f"{speed=:.2f}") + + if is_in_ci(): + write_github_step_summary( + f"### test_bs_1_speed (deepseek-v3)\n" f"{speed=:.2f} token/s\n" + ) + if is_in_amd_ci(): + self.assertGreater(speed, 12) + else: + self.assertGreater(speed, 75) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/registered/amd/test_deepseek_v3_mtp.py b/test/registered/amd/test_deepseek_v3_mtp.py new file mode 100644 index 000000000..291909474 --- /dev/null +++ b/test/registered/amd/test_deepseek_v3_mtp.py @@ -0,0 +1,116 @@ +import unittest +from types import SimpleNamespace + +import requests + +from sglang.srt.utils import kill_process_tree +from sglang.test.ci.ci_register import register_amd_ci +from sglang.test.few_shot_gsm8k import run_eval as run_eval_few_shot_gsm8k +from sglang.test.send_one import BenchArgs, send_one_prompt +from sglang.test.test_utils import ( + DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH, + DEFAULT_URL_FOR_TEST, + CustomTestCase, + is_in_amd_ci, + is_in_ci, + popen_launch_server, + write_github_step_summary, +) + +register_amd_ci(est_time=980, suite="stage-c-test-large-8-gpu-amd") + +FULL_DEEPSEEK_V3_MODEL_PATH = "deepseek-ai/DeepSeek-V3-0324" + + +class TestDeepseekV3MTP(CustomTestCase): + @classmethod + def setUpClass(cls): + cls.model = FULL_DEEPSEEK_V3_MODEL_PATH + cls.base_url = DEFAULT_URL_FOR_TEST + other_args = [ + "--tp", + "8", + "--trust-remote-code", + "--speculative-algorithm", + "EAGLE", + "--speculative-num-steps", + "3", + "--speculative-eagle-topk", + "1", + "--speculative-num-draft-tokens", + "4", + "--model-loader-extra-config", + '{"enable_multithread_load": true, "num_threads": 64}', + ] + if not is_in_amd_ci(): + other_args += ["--mem-frac", "0.7"] + cls.process = popen_launch_server( + cls.model, + cls.base_url, + timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH * 5, + other_args=other_args, + ) + + @classmethod + def tearDownClass(cls): + kill_process_tree(cls.process.pid) + + def test_a_gsm8k( + self, + ): # Append an "a" to make this test run first (alphabetically) to warm up the server + requests.get(self.base_url + "/flush_cache") + + args = SimpleNamespace( + num_shots=5, + data_path=None, + num_questions=200, + max_new_tokens=512, + parallel=128, + host="http://127.0.0.1", + port=int(self.base_url.split(":")[-1]), + ) + metrics = run_eval_few_shot_gsm8k(args) + print(f"{metrics=}") + + server_info = requests.get(self.base_url + "/get_server_info") + avg_spec_accept_length = server_info.json()["internal_states"][0][ + "avg_spec_accept_length" + ] + print(f"{avg_spec_accept_length=}") + + if is_in_ci(): + write_github_step_summary( + f"### test_gsm8k (deepseek-v3 mtp)\n" + f'{metrics["accuracy"]=:.3f}\n' + f"{avg_spec_accept_length=:.2f}\n" + ) + self.assertGreater(metrics["accuracy"], 0.935) + if is_in_amd_ci(): + self.assertGreater(avg_spec_accept_length, 2.8) + else: + self.assertGreater(avg_spec_accept_length, 2.9) + + def test_bs_1_speed(self): + args = BenchArgs(port=int(self.base_url.split(":")[-1]), max_new_tokens=2048) + acc_length, speed = send_one_prompt(args) + + print(f"{acc_length=:.2f} {speed=:.2f}") + + if is_in_ci(): + write_github_step_summary( + f"### test_bs_1_speed (deepseek-v3 mtp)\n" + f"{acc_length=:.2f}\n" + f"{speed=:.2f} token/s\n" + ) + if is_in_amd_ci(): + self.assertGreater(acc_length, 2.8) + else: + self.assertGreater(acc_length, 2.9) + if is_in_amd_ci(): + self.assertGreater(speed, 15) + else: + self.assertGreater(speed, 130) + + +if __name__ == "__main__": + unittest.main() diff --git a/test/registered/attention/test_wave_attention_kernels.py b/test/registered/attention/test_wave_attention_kernels.py index 9dc22651e..f7cd5c3b3 100644 --- a/test/registered/attention/test_wave_attention_kernels.py +++ b/test/registered/attention/test_wave_attention_kernels.py @@ -24,7 +24,7 @@ from sglang.srt.layers.attention.wave_ops.prefill_attention import ( from sglang.test.ci.ci_register import register_amd_ci # Wave attention kernel unit tests (AMD only - requires wave_lang) -register_amd_ci(est_time=60, suite="stage-a-test-1") +register_amd_ci(est_time=60, suite="stage-a-test-1-amd") class TestWaveAttention(unittest.TestCase): diff --git a/test/registered/core/test_deterministic.py b/test/registered/core/test_deterministic.py index e087c990a..aafbf101c 100644 --- a/test/registered/core/test_deterministic.py +++ b/test/registered/core/test_deterministic.py @@ -9,15 +9,18 @@ test into unit tests so that's easily reproducible in CI. 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.test_deterministic_utils import ( COMMON_SERVER_ARGS, TestDeterministicBase, ) +from sglang.test.test_utils import is_in_amd_ci register_cuda_ci(est_time=278, suite="stage-b-test-large-1-gpu") +register_amd_ci(est_time=278, suite="stage-b-test-small-1-gpu-amd") +@unittest.skipIf(is_in_amd_ci(), "Skip for AMD CI.") class TestFlashinferDeterministic(TestDeterministicBase): # Test with flashinfer attention backend @classmethod @@ -32,6 +35,7 @@ class TestFlashinferDeterministic(TestDeterministicBase): return args +@unittest.skipIf(is_in_amd_ci(), "Skip for AMD CI.") class TestFa3Deterministic(TestDeterministicBase): # Test with fa3 attention backend @classmethod diff --git a/test/registered/hicache/test_hicache_storage_3fs_backend.py b/test/registered/hicache/test_hicache_storage_3fs_backend.py index ec28b53c3..8a9cb6e06 100644 --- a/test/registered/hicache/test_hicache_storage_3fs_backend.py +++ b/test/registered/hicache/test_hicache_storage_3fs_backend.py @@ -10,10 +10,11 @@ import unittest from test_hicache_storage_file_backend import HiCacheStorageBaseMixin -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=200, suite="stage-b-test-large-2-gpu") +register_amd_ci(est_time=300, suite="stage-b-test-large-2-gpu") class HiCacheStorage3FSBackendBaseMixin(HiCacheStorageBaseMixin): diff --git a/test/registered/hicache/test_hicache_storage_file_backend.py b/test/registered/hicache/test_hicache_storage_file_backend.py index 153536fc3..a3ce03564 100644 --- a/test/registered/hicache/test_hicache_storage_file_backend.py +++ b/test/registered/hicache/test_hicache_storage_file_backend.py @@ -18,7 +18,7 @@ import requests from sglang.bench_serving import get_tokenizer from sglang.srt.utils import 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.few_shot_gsm8k import run_eval as run_eval_few_shot_gsm8k from sglang.test.test_utils import ( DEFAULT_MLA_MODEL_NAME_FOR_TEST, @@ -31,6 +31,7 @@ from sglang.test.test_utils import ( ) register_cuda_ci(est_time=200, suite="stage-b-test-large-2-gpu") +register_amd_ci(est_time=526, suite="stage-b-test-large-2-gpu-amd") class HiCacheStorageBaseMixin: diff --git a/test/registered/openai_server/basic/test_serving_rerank.py b/test/registered/openai_server/basic/test_serving_rerank.py index 64f0f15ce..55eff93a7 100644 --- a/test/registered/openai_server/basic/test_serving_rerank.py +++ b/test/registered/openai_server/basic/test_serving_rerank.py @@ -7,7 +7,7 @@ from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci # Keep consistent with other openai_server/basic unit tests. register_cuda_ci(est_time=10, suite="stage-b-test-large-1-gpu") -register_amd_ci(est_time=10, suite="stage-b-test-small-1-gpu") +register_amd_ci(est_time=10, suite="stage-b-test-small-1-gpu-amd") try: from sglang.srt.entrypoints.openai.serving_rerank import ( diff --git a/test/registered/quant/test_awq_dequant.py b/test/registered/quant/test_awq_dequant.py index 3752d10d6..18856aaf2 100644 --- a/test/registered/quant/test_awq_dequant.py +++ b/test/registered/quant/test_awq_dequant.py @@ -19,7 +19,7 @@ from sglang.srt.layers.quantization.awq_triton import ( from sglang.test.ci.ci_register import register_amd_ci from sglang.test.test_utils import CustomTestCase -register_amd_ci(est_time=2, suite="stage-a-test-1") +register_amd_ci(est_time=2, suite="stage-a-test-1-amd") device = "cuda" diff --git a/test/registered/quant/test_fused_rms_fp8_group_quant.py b/test/registered/quant/test_fused_rms_fp8_group_quant.py index 91685c927..5750908e8 100644 --- a/test/registered/quant/test_fused_rms_fp8_group_quant.py +++ b/test/registered/quant/test_fused_rms_fp8_group_quant.py @@ -7,7 +7,7 @@ import torch.nn.functional as F from sglang.test.ci.ci_register import register_amd_ci from sglang.test.test_utils import CustomTestCase -register_amd_ci(est_time=10, suite="stage-a-test-1") +register_amd_ci(est_time=10, suite="stage-a-test-1-amd") def _fp8_available() -> bool: diff --git a/test/srt/test_int4fp8_moe.py b/test/registered/quant/test_int4fp8_moe.py similarity index 92% rename from test/srt/test_int4fp8_moe.py rename to test/registered/quant/test_int4fp8_moe.py index bcc7d9d46..48e03d440 100644 --- a/test/srt/test_int4fp8_moe.py +++ b/test/registered/quant/test_int4fp8_moe.py @@ -1,6 +1,7 @@ from types import SimpleNamespace from sglang.srt.utils import kill_process_tree +from sglang.test.ci.ci_register import register_amd_ci from sglang.test.few_shot_gsm8k import run_eval from sglang.test.test_utils import ( DEFAULT_URL_FOR_TEST, @@ -8,6 +9,8 @@ from sglang.test.test_utils import ( popen_launch_server, ) +register_amd_ci(est_time=313, suite="stage-b-test-small-1-gpu-amd") + class TestMixtralAccuracy(CustomTestCase): @classmethod diff --git a/test/registered/rl/test_lora_load_from_tensor.py b/test/registered/rl/test_lora_load_from_tensor.py index 941e03fb5..a5c4e7e3b 100644 --- a/test/registered/rl/test_lora_load_from_tensor.py +++ b/test/registered/rl/test_lora_load_from_tensor.py @@ -11,7 +11,7 @@ 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=90, suite="stage-b-test-small-1-gpu") -register_amd_ci(est_time=90, suite="stage-b-test-small-1-gpu") +register_amd_ci(est_time=90, suite="stage-b-test-small-1-gpu-amd") MODEL_PATH = "Qwen/Qwen3-0.6B" LORA_REPO = "charent/self_cognition_Alice" diff --git a/test/srt/test_rope_rocm.py b/test/registered/rotary/test_rope_rocm.py similarity index 97% rename from test/srt/test_rope_rocm.py rename to test/registered/rotary/test_rope_rocm.py index 4133fdb2d..7ab788555 100644 --- a/test/srt/test_rope_rocm.py +++ b/test/registered/rotary/test_rope_rocm.py @@ -4,8 +4,11 @@ import torch from sglang.srt.layers.rotary_embedding import RotaryEmbedding from sglang.srt.utils import get_bool_env_var, is_hip +from sglang.test.ci.ci_register import register_amd_ci from sglang.test.test_utils import CustomTestCase +register_amd_ci(est_time=3, suite="stage-b-test-small-1-gpu-amd") + torch.manual_seed(0) _is_hip = is_hip() diff --git a/test/registered/test_srt_backend.py b/test/registered/test_srt_backend.py index 0768e7190..535794d63 100644 --- a/test/registered/test_srt_backend.py +++ b/test/registered/test_srt_backend.py @@ -20,7 +20,7 @@ from sglang.test.test_programs import ( from sglang.test.test_utils import DEFAULT_MODEL_NAME_FOR_TEST, CustomTestCase register_cuda_ci(est_time=80, suite="stage-a-test-1") -register_amd_ci(est_time=120, suite="stage-a-test-1") +register_amd_ci(est_time=120, suite="stage-a-test-1-amd") class TestSRTBackend(CustomTestCase): diff --git a/test/srt/test_bench_typebaseddispatcher.py b/test/registered/utils/test_bench_typebaseddispatcher.py similarity index 98% rename from test/srt/test_bench_typebaseddispatcher.py rename to test/registered/utils/test_bench_typebaseddispatcher.py index 1c048b89c..2feeaf79c 100644 --- a/test/srt/test_bench_typebaseddispatcher.py +++ b/test/registered/utils/test_bench_typebaseddispatcher.py @@ -1,8 +1,11 @@ import timeit from typing import Any, Callable, List, Tuple, Type +from sglang.test.ci.ci_register import register_amd_ci from sglang.utils import TypeBasedDispatcher +register_amd_ci(est_time=10, suite="stage-b-test-small-1-gpu-amd") + class TypeBasedDispatcherList: def __init__(self, mapping: List[Tuple[Type, Callable]]): diff --git a/test/srt/test_type_based_dispatcher.py b/test/registered/utils/test_type_based_dispatcher.py similarity index 98% rename from test/srt/test_type_based_dispatcher.py rename to test/registered/utils/test_type_based_dispatcher.py index 1049a40ae..89dc37282 100644 --- a/test/srt/test_type_based_dispatcher.py +++ b/test/registered/utils/test_type_based_dispatcher.py @@ -8,8 +8,11 @@ import timeit import unittest from sglang.srt.managers.io_struct import SamplingParams +from sglang.test.ci.ci_register import register_amd_ci from sglang.utils import TypeBasedDispatcher +register_amd_ci(est_time=10, suite="stage-b-test-small-1-gpu-amd") + class TestTypeBasedDispatcher(unittest.TestCase): """Unit tests for TypeBasedDispatcher e2e performance.""" diff --git a/test/run_suite.py b/test/run_suite.py index 815eead31..6708bf14e 100644 --- a/test/run_suite.py +++ b/test/run_suite.py @@ -19,7 +19,7 @@ HW_MAPPING = { PER_COMMIT_SUITES = { HWBackend.CPU: ["default", "stage-a-cpu-only"], HWBackend.AMD: [ - "stage-a-test-1", + "stage-a-test-1-amd", "stage-b-test-small-1-gpu-amd", "stage-b-test-small-1-gpu-amd-mi35x", "stage-b-test-large-2-gpu-amd", diff --git a/test/srt/run_suite.py b/test/srt/run_suite.py index bb1cb30de..e8e0e5874 100644 --- a/test/srt/run_suite.py +++ b/test/srt/run_suite.py @@ -80,10 +80,7 @@ suite_amd = { # TestFile("lora/test_lora_backend.py", 99), # Disabled temporarily, see https://github.com/sgl-project/sglang/issues/13107 # TestFile("lora/test_lora_cuda_graph.py", 250), # Disabled temporarily, see https://github.com/sgl-project/sglang/issues/13107 # TestFile("lora/test_lora_qwen3.py", 97), # Disabled temporarily, see https://github.com/sgl-project/sglang/issues/13107 - TestFile("test_bench_typebaseddispatcher.py", 10), - TestFile("test_rope_rocm.py", 3), # TestFile("test_torch_compile_moe.py", 210), # Disabled temporarily, see https://github.com/sgl-project/sglang/issues/13107 - TestFile("test_type_based_dispatcher.py", 10), # Disabled temporarily # TestFile("test_vlm_input_format.py", 300), # TestFile("openai_server/features/test_openai_server_hidden_states.py", 240), @@ -92,15 +89,10 @@ suite_amd = { # TestFile("test_vision_chunked_prefill.py", 175), # Disabled temporarily and track in #7701 # TestFile("test_wave_attention_backend.py", 150), # Disabled temporarily, see https://github.com/sgl-project/sglang/issues/11127 # The time estimation for `test_int4fp8_moe.py` assumes `mistralai/Mixtral-8x7B-Instruct-v0.1` is already cached (running on 1xMI300X). - TestFile("test_int4fp8_moe.py", 313), ], "per-commit-4-gpu-amd": [ TestFile("test_pp_single_node.py", 150), ], - "per-commit-8-gpu-amd": [ - TestFile("test_deepseek_v3_basic.py", 275), - TestFile("test_deepseek_v3_mtp.py", 275), - ], # NOTE: AMD nightly suites (nightly-amd, nightly-amd-vlm, nightly-amd-8-gpu) # have been migrated to test/registered/amd/nightly/ and are now managed # by test/run_suite.py using the registry system.