From f7be98e1131a23093d53805f5c13283599f4472c Mon Sep 17 00:00:00 2001 From: Liangsheng Yin Date: Wed, 19 Nov 2025 11:47:41 +0800 Subject: [PATCH] [CI] fix amd 1 gpu basic test (#13551) --- .github/workflows/pr-test-amd.yml | 10 +++++----- test/per_commit/test_srt_backend.py | 3 ++- test/run_suite.py | 6 ++++-- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pr-test-amd.yml b/.github/workflows/pr-test-amd.yml index 9a48f6d80..8a48f7cb7 100644 --- a/.github/workflows/pr-test-amd.yml +++ b/.github/workflows/pr-test-amd.yml @@ -116,7 +116,7 @@ jobs: - name: Run test timeout-minutes: 10 run: | - docker exec -w /sglang-checkout/test ci_sglang python3 run_suite.py --hw cuda --suite stage-a-test-1 + docker exec -w /sglang-checkout/test ci_sglang python3 run_suite.py --hw amd --suite stage-a-test-1 unit-test-backend-1-gpu-amd: needs: [check-changes, stage-a-test-1-amd] @@ -149,7 +149,7 @@ jobs: bash scripts/ci/amd_ci_exec.sh python3 run_suite.py --suite per-commit-amd --auto-partition-id ${{ matrix.part }} --auto-partition-size 12 unit-test-backend-2-gpu-amd: - needs: [check-changes] + needs: [check-changes, stage-a-test-1-amd] if: always() && !failure() && !cancelled() && ((needs.check-changes.outputs.main_package == 'true') || (needs.check-changes.outputs.sgl_kernel == 'true')) strategy: @@ -211,7 +211,7 @@ jobs: 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 3 --timeout-per-file 3600 performance-test-1-gpu-part-1-amd: - needs: [check-changes] + needs: [check-changes, stage-a-test-1-amd] if: always() && !failure() && !cancelled() && ((needs.check-changes.outputs.main_package == 'true') || (needs.check-changes.outputs.sgl_kernel == 'true')) strategy: @@ -256,7 +256,7 @@ jobs: bash scripts/ci/amd_ci_exec.sh python3 -m unittest test_bench_serving.TestBenchServing.test_offline_throughput_non_stream_small_batch_size performance-test-1-gpu-part-2-amd: - needs: [check-changes] + needs: [check-changes, stage-a-test-1-amd] if: always() && !failure() && !cancelled() && ((needs.check-changes.outputs.main_package == 'true') || (needs.check-changes.outputs.sgl_kernel == 'true')) strategy: @@ -344,7 +344,7 @@ jobs: bash scripts/ci/amd_ci_exec.sh python3 -m unittest test_bench_serving.TestBenchServing.test_moe_offline_throughput_without_radix_cache accuracy-test-1-gpu-amd: - needs: [check-changes] + needs: [check-changes, stage-a-test-1-amd] if: always() && !failure() && !cancelled() && ((needs.check-changes.outputs.main_package == 'true') || (needs.check-changes.outputs.sgl_kernel == 'true')) strategy: diff --git a/test/per_commit/test_srt_backend.py b/test/per_commit/test_srt_backend.py index 5b44eac60..f3ad67cf4 100644 --- a/test/per_commit/test_srt_backend.py +++ b/test/per_commit/test_srt_backend.py @@ -1,7 +1,7 @@ import unittest 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_programs import ( test_decode_int, test_decode_json_regex, @@ -20,6 +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") class TestSRTBackend(CustomTestCase): diff --git a/test/run_suite.py b/test/run_suite.py index 000fee970..88e6f185f 100644 --- a/test/run_suite.py +++ b/test/run_suite.py @@ -8,11 +8,13 @@ from sglang.test.ci.ci_utils import TestFile, run_unittest_files HW_MAPPING = { "cpu": HWBackend.CPU, "cuda": HWBackend.CUDA, + "amd": HWBackend.AMD, } LABEL_MAPPING = { - HWBackend.CUDA: ["stage-a-test-1"], HWBackend.CPU: ["default"], + HWBackend.AMD: ["stage-a-test-1"], + HWBackend.CUDA: ["stage-a-test-1"], } @@ -45,7 +47,7 @@ def main(): parser.add_argument( "--hw", type=str, - choices=["cpu", "cuda"], + choices=["cpu", "cuda", "amd"], required=True, help="Hardware backend to run tests on.", )