From 90eac38a12973231388f12f23055f0262aeff603 Mon Sep 17 00:00:00 2001 From: Alison Shao <54658187+alisonshao@users.noreply.github.com> Date: Tue, 6 Jan 2026 18:27:43 -0800 Subject: [PATCH] Migrate FP8/TorchAO tests to test/registered/quant/ (#16453) --- .github/workflows/pr-test-amd.yml | 1 - test/registered/quant/test_autoround.py | 1 - test/registered/quant/test_awq_dequant.py | 1 - test/registered/quant/test_block_int8.py | 1 - test/{srt => registered/quant}/test_eval_fp8_accuracy.py | 4 ++++ test/registered/quant/test_fp8_kernel.py | 1 - test/{srt => registered/quant}/test_fp8_utils.py | 3 +++ test/registered/quant/test_fused_rms_fp8_group_quant.py | 1 - test/registered/quant/test_int8_kernel.py | 1 - test/{srt => registered/quant}/test_torchao.py | 3 +++ test/registered/quant/test_triton_scaled_mm.py | 1 - test/registered/quant/test_w8a8_quantization.py | 1 - test/srt/run_suite.py | 4 ---- 13 files changed, 10 insertions(+), 13 deletions(-) rename test/{srt => registered/quant}/test_eval_fp8_accuracy.py (94%) rename test/{srt => registered/quant}/test_fp8_utils.py (91%) rename test/{srt => registered/quant}/test_torchao.py (95%) diff --git a/.github/workflows/pr-test-amd.yml b/.github/workflows/pr-test-amd.yml index ab6381409..30a57836f 100644 --- a/.github/workflows/pr-test-amd.yml +++ b/.github/workflows/pr-test-amd.yml @@ -832,7 +832,6 @@ jobs: timeout-minutes: 30 run: | bash scripts/ci/amd_ci_exec.sh -e SGLANG_USE_AITER=0 python3 test_eval_accuracy_large.py - bash scripts/ci/amd_ci_exec.sh python3 test_eval_fp8_accuracy.py accuracy-test-2-gpu-amd: needs: [check-changes, accuracy-test-1-gpu-amd] diff --git a/test/registered/quant/test_autoround.py b/test/registered/quant/test_autoround.py index f1ce7e5aa..df69f1e5c 100644 --- a/test/registered/quant/test_autoround.py +++ b/test/registered/quant/test_autoround.py @@ -17,7 +17,6 @@ from sglang.test.test_utils import ( popen_launch_server, ) -# AutoRound quantization tests register_cuda_ci(est_time=77, suite="stage-b-test-small-1-gpu") diff --git a/test/registered/quant/test_awq_dequant.py b/test/registered/quant/test_awq_dequant.py index 98460742d..3752d10d6 100644 --- a/test/registered/quant/test_awq_dequant.py +++ b/test/registered/quant/test_awq_dequant.py @@ -19,7 +19,6 @@ 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 -# AWQ dequantization tests (AMD only) register_amd_ci(est_time=2, suite="stage-a-test-1") device = "cuda" diff --git a/test/registered/quant/test_block_int8.py b/test/registered/quant/test_block_int8.py index 3840cbd27..b3787315f 100644 --- a/test/registered/quant/test_block_int8.py +++ b/test/registered/quant/test_block_int8.py @@ -10,7 +10,6 @@ from sglang.srt.server_args import ServerArgs, set_global_server_args_for_schedu from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci from sglang.test.test_utils import CustomTestCase -# Block INT8 quantization kernel tests register_cuda_ci(est_time=44, suite="stage-b-test-small-1-gpu") register_amd_ci(est_time=22, suite="stage-a-test-1") diff --git a/test/srt/test_eval_fp8_accuracy.py b/test/registered/quant/test_eval_fp8_accuracy.py similarity index 94% rename from test/srt/test_eval_fp8_accuracy.py rename to test/registered/quant/test_eval_fp8_accuracy.py index 329e2dad8..f92ca4977 100644 --- a/test/srt/test_eval_fp8_accuracy.py +++ b/test/registered/quant/test_eval_fp8_accuracy.py @@ -2,6 +2,7 @@ import unittest from types import SimpleNamespace from sglang.srt.utils import is_hip, kill_process_tree +from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci from sglang.test.run_eval import run_eval from sglang.test.test_utils import ( DEFAULT_MODEL_NAME_FOR_ACCURACY_TEST_FP8, @@ -13,6 +14,9 @@ from sglang.test.test_utils import ( popen_launch_server, ) +register_cuda_ci(est_time=250, suite="stage-b-test-small-1-gpu") +register_amd_ci(est_time=303, suite="stage-b-test-small-1-gpu") + class TestEvalFP8Accuracy(CustomTestCase): @classmethod diff --git a/test/registered/quant/test_fp8_kernel.py b/test/registered/quant/test_fp8_kernel.py index c754ee9de..0e5537d48 100644 --- a/test/registered/quant/test_fp8_kernel.py +++ b/test/registered/quant/test_fp8_kernel.py @@ -9,7 +9,6 @@ from sglang.srt.layers.quantization.fp8_kernel import ( from sglang.test.ci.ci_register import register_cuda_ci from sglang.test.test_utils import CustomTestCase -# FP8 quantization kernel tests register_cuda_ci(est_time=10, suite="stage-b-test-small-1-gpu") diff --git a/test/srt/test_fp8_utils.py b/test/registered/quant/test_fp8_utils.py similarity index 91% rename from test/srt/test_fp8_utils.py rename to test/registered/quant/test_fp8_utils.py index 1e75d4855..f5ec4fcb8 100644 --- a/test/srt/test_fp8_utils.py +++ b/test/registered/quant/test_fp8_utils.py @@ -7,8 +7,11 @@ from sglang.srt.layers.quantization.fp8_utils import ( quant_weight_ue8m0, transform_scale_ue8m0, ) +from sglang.test.ci.ci_register import register_cuda_ci from sglang.test.test_utils import CustomTestCase +register_cuda_ci(est_time=9, suite="stage-b-test-small-1-gpu") + class TestInverseTransformScaleUe8m0(CustomTestCase): def test_round_trip(self): 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 5ec57df18..91685c927 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,6 @@ import torch.nn.functional as F from sglang.test.ci.ci_register import register_amd_ci from sglang.test.test_utils import CustomTestCase -# Fused RMS FP8 group quantization tests (AMD/ROCm only) register_amd_ci(est_time=10, suite="stage-a-test-1") diff --git a/test/registered/quant/test_int8_kernel.py b/test/registered/quant/test_int8_kernel.py index 0e09b4257..d45f82efb 100644 --- a/test/registered/quant/test_int8_kernel.py +++ b/test/registered/quant/test_int8_kernel.py @@ -11,7 +11,6 @@ from sglang.srt.server_args import ServerArgs, set_global_server_args_for_schedu from sglang.test.ci.ci_register import register_cuda_ci from sglang.test.test_utils import CustomTestCase -# INT8 quantization kernel tests register_cuda_ci(est_time=8, suite="stage-b-test-small-1-gpu") diff --git a/test/srt/test_torchao.py b/test/registered/quant/test_torchao.py similarity index 95% rename from test/srt/test_torchao.py rename to test/registered/quant/test_torchao.py index 53368aaa4..bc2c93884 100644 --- a/test/srt/test_torchao.py +++ b/test/registered/quant/test_torchao.py @@ -4,6 +4,9 @@ from types import SimpleNamespace import requests from sglang import Engine +from sglang.test.ci.ci_register import register_cuda_ci + +register_cuda_ci(est_time=103, suite="stage-b-test-small-1-gpu") from sglang.lang.chat_template import get_chat_template_by_model_path from sglang.srt.utils import kill_process_tree from sglang.test.run_eval import run_eval diff --git a/test/registered/quant/test_triton_scaled_mm.py b/test/registered/quant/test_triton_scaled_mm.py index 38ba68ced..aac9acc26 100644 --- a/test/registered/quant/test_triton_scaled_mm.py +++ b/test/registered/quant/test_triton_scaled_mm.py @@ -8,7 +8,6 @@ from sglang.srt.layers.quantization.fp8_kernel import triton_scaled_mm from sglang.test.ci.ci_register import register_amd_ci, register_cuda_ci from sglang.test.test_utils import CustomTestCase -# Triton scaled matrix multiplication tests register_cuda_ci(est_time=8, suite="stage-b-test-small-1-gpu") register_amd_ci(est_time=12, suite="stage-a-test-1") diff --git a/test/registered/quant/test_w8a8_quantization.py b/test/registered/quant/test_w8a8_quantization.py index c1004ba3e..3afac0830 100644 --- a/test/registered/quant/test_w8a8_quantization.py +++ b/test/registered/quant/test_w8a8_quantization.py @@ -14,7 +14,6 @@ from sglang.test.test_utils import ( popen_launch_server, ) -# W8A8 quantization server integration tests register_cuda_ci(est_time=160, suite="stage-b-test-small-1-gpu") diff --git a/test/srt/run_suite.py b/test/srt/run_suite.py index f3f428ee8..5f43c5c85 100644 --- a/test/srt/run_suite.py +++ b/test/srt/run_suite.py @@ -10,10 +10,8 @@ from sglang.test.ci.ci_utils import TestFile, run_unittest_files suites = { "per-commit-1-gpu": [ TestFile("test_deterministic.py", 228), - TestFile("test_eval_fp8_accuracy.py", 250), TestFile("test_evs.py", 20), TestFile("test_external_models.py", 30), - TestFile("test_fp8_utils.py", 9), TestFile("test_gpt_oss_1gpu.py", 402), TestFile("test_hidden_states.py", 55), TestFile("test_input_embeddings.py", 38), @@ -35,7 +33,6 @@ suites = { TestFile("test_profile_merger_http_api.py", 9), TestFile("test_swa_unittest.py", 8), TestFile("test_torch_compile.py", 190), - TestFile("test_torchao.py", 103), TestFile("test_utils_update_weights.py", 29), TestFile("test_video_utils.py", 5), TestFile("test_modelopt_export.py", 9), @@ -128,7 +125,6 @@ suite_amd = { # 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_eval_fp8_accuracy.py", 303), TestFile("test_external_models.py", 45), TestFile("test_input_embeddings.py", 38), TestFile("test_io_struct.py", 8),