Skip to content

Commit 81e2ac4

Browse files
alisonshaoKevin-XiongC
authored andcommitted
[CI] Migrate Eagle 1-GPU tests to test/registered/ (sgl-project#14529)
1 parent 80a653f commit 81e2ac4

File tree

9 files changed

+58
-6
lines changed

9 files changed

+58
-6
lines changed

.github/workflows/pr-test.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,46 @@ jobs:
395395
# temporarily put backend-independent cpu tests here
396396
python3 run_suite.py --hw cpu --suite default
397397
398+
stage-b-test-small-1-gpu:
399+
needs: [check-changes, call-gate, stage-a-test-1, sgl-kernel-build-wheels]
400+
if: |
401+
always() &&
402+
(
403+
(inputs.target_stage == 'stage-b-test-small-1-gpu') ||
404+
(
405+
!inputs.target_stage &&
406+
(github.event_name == 'schedule' || (!failure() && !cancelled())) &&
407+
((needs.check-changes.outputs.main_package == 'true') || (needs.check-changes.outputs.sgl_kernel == 'true'))
408+
)
409+
)
410+
runs-on: 1-gpu-runner
411+
env:
412+
RUNNER_LABELS: 1-gpu-runner
413+
strategy:
414+
fail-fast: false
415+
matrix:
416+
partition: [0, 1, 2, 3]
417+
steps:
418+
- name: Checkout code
419+
uses: actions/checkout@v4
420+
421+
- name: Download artifacts
422+
if: needs.check-changes.outputs.sgl_kernel == 'true'
423+
uses: actions/download-artifact@v4
424+
with:
425+
path: sgl-kernel/dist/
426+
merge-multiple: true
427+
pattern: wheel-python3.10-cuda12.9
428+
429+
- name: Install dependencies
430+
run: |
431+
CUSTOM_BUILD_SGL_KERNEL=${{needs.check-changes.outputs.sgl_kernel}} bash scripts/ci/ci_install_dependency.sh
432+
433+
- name: Run test
434+
timeout-minutes: 30
435+
run: |
436+
cd test/
437+
python3 run_suite.py --hw cuda --suite stage-b-test-small-1-gpu --auto-partition-id ${{ matrix.partition }} --auto-partition-size 4
398438
399439
multimodal-gen-test-1-gpu:
400440
needs: [check-changes, call-gate, sgl-kernel-build-wheels]
@@ -1264,6 +1304,7 @@ jobs:
12641304
multimodal-gen-test-2-gpu,
12651305

12661306
stage-a-test-1,
1307+
stage-b-test-small-1-gpu,
12671308
quantization-test,
12681309
unit-test-backend-1-gpu,
12691310
unit-test-backend-2-gpu,

scripts/ci/slash_command_handler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ def handle_rerun_stage(
143143
# Valid NVIDIA stage names that support target_stage
144144
nvidia_stages = [
145145
"stage-a-test-1",
146+
"stage-b-test-small-1-gpu",
146147
"multimodal-gen-test-1-gpu",
147148
"multimodal-gen-test-2-gpu",
148149
"quantization-test",

test/srt/test_eagle_constrained_decoding.py renamed to test/registered/spec/eagle/test_eagle_constrained_decoding.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from sglang.srt.environ import envs
44
from sglang.srt.utils import kill_process_tree
5+
from sglang.test.ci.ci_register import register_cuda_ci
56
from sglang.test.kits.json_constrained_kit import TestJSONConstrainedMixin
67
from sglang.test.kits.regex_constrained_kit import TestRegexConstrainedMixin
78
from sglang.test.test_utils import (
@@ -13,6 +14,8 @@
1314
popen_launch_server,
1415
)
1516

17+
register_cuda_ci(est_time=100, suite="stage-b-test-small-1-gpu")
18+
1619

1720
class TestEagleConstrainedDecoding(
1821
CustomTestCase, TestRegexConstrainedMixin, TestJSONConstrainedMixin

test/srt/test_eagle_infer_a.py renamed to test/registered/spec/eagle/test_eagle_infer_a.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import sglang as sgl
88
from sglang.srt.utils import kill_process_tree
99
from sglang.srt.utils.hf_transformers_utils import get_tokenizer
10+
from sglang.test.ci.ci_register import register_cuda_ci
1011
from sglang.test.test_utils import (
1112
DEFAULT_EAGLE_DRAFT_MODEL_FOR_TEST,
1213
DEFAULT_EAGLE_TARGET_MODEL_FOR_TEST,
@@ -20,6 +21,8 @@
2021
popen_launch_server,
2122
)
2223

24+
register_cuda_ci(est_time=470, suite="stage-b-test-small-1-gpu")
25+
2326
torch_dtype = torch.float16
2427
prefill_tolerance = 5e-2
2528
decode_tolerance: float = 5e-2

test/srt/test_eagle_infer_b.py renamed to test/registered/spec/eagle/test_eagle_infer_b.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import requests
1313

1414
from sglang.srt.utils import kill_process_tree
15+
from sglang.test.ci.ci_register import register_cuda_ci
1516
from sglang.test.few_shot_gsm8k import run_eval
1617
from sglang.test.test_utils import (
1718
DEFAULT_EAGLE_DRAFT_MODEL_FOR_TEST,
@@ -23,6 +24,8 @@
2324
run_logprob_check,
2425
)
2526

27+
register_cuda_ci(est_time=473, suite="stage-b-test-small-1-gpu")
28+
2629

2730
class TestEAGLEServer(CustomTestCase):
2831
PROMPTS = [

test/srt/test_eagle_infer_beta.py renamed to test/registered/spec/eagle/test_eagle_infer_beta.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from sglang.srt.environ import envs
55
from sglang.srt.utils import kill_process_tree
6+
from sglang.test.ci.ci_register import register_cuda_ci
67
from sglang.test.few_shot_gsm8k import run_eval
78
from sglang.test.kits.matched_stop_kit import MatchedStopMixin
89
from sglang.test.kits.radix_cache_server_kit import run_radix_attention_test
@@ -15,6 +16,8 @@
1516
popen_launch_server,
1617
)
1718

19+
register_cuda_ci(est_time=194, suite="stage-b-test-small-1-gpu")
20+
1821

1922
class TestEagleServerBase(CustomTestCase, MatchedStopMixin):
2023
max_running_requests = 64

test/srt/test_build_eagle_tree.py renamed to test/registered/spec/utils/test_build_eagle_tree.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
build_tree_kernel_efficient,
77
organize_draft_results,
88
)
9+
from sglang.test.ci.ci_register import register_cuda_ci
10+
11+
register_cuda_ci(est_time=3, suite="stage-b-test-small-1-gpu")
912

1013

1114
class TestBuildEagleTree(unittest.TestCase):

test/run_suite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
PER_COMMIT_SUITES = {
1818
HWBackend.CPU: ["default"],
1919
HWBackend.AMD: ["stage-a-test-1"],
20-
HWBackend.CUDA: ["stage-a-test-1"],
20+
HWBackend.CUDA: ["stage-a-test-1", "stage-b-test-small-1-gpu"],
2121
HWBackend.NPU: [],
2222
}
2323

test/srt/run_suite.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
# NOTE: please sort the test cases alphabetically by the test file name
88
suites = {
99
"per-commit-1-gpu": [
10-
TestFile("test_eagle_constrained_decoding.py", 100),
1110
TestFile("debug_utils/test_tensor_dump_forward_hook.py", 9),
1211
TestFile("hicache/test_hicache_storage.py", 96),
1312
TestFile("hicache/test_hicache_variants.py", 368),
@@ -58,13 +57,9 @@
5857
# TestFile("rl/test_update_weights_from_disk.py", 210), # Temporarily disabled, see https://github.com/sgl-project/sglang/pull/13998
5958
TestFile("rl/test_update_weights_from_tensor.py", 195),
6059
TestFile("test_abort.py", 131),
61-
TestFile("test_build_eagle_tree.py", 3),
6260
TestFile("test_chunked_prefill.py", 312),
6361
TestFile("test_create_kvindices.py", 7),
6462
TestFile("test_deterministic.py", 228),
65-
TestFile("test_eagle_infer_a.py", 470),
66-
TestFile("test_eagle_infer_b.py", 473),
67-
TestFile("test_eagle_infer_beta.py", 194),
6863
TestFile("test_constrained_decoding.py", 111),
6964
TestFile("test_eval_fp8_accuracy.py", 250),
7065
TestFile("test_external_models.py", 30),

0 commit comments

Comments
 (0)