diff --git a/test/srt/quant/test_autoround.py b/test/registered/quant/test_autoround.py similarity index 92% rename from test/srt/quant/test_autoround.py rename to test/registered/quant/test_autoround.py index 18e5ad66c..f1ce7e5aa 100644 --- a/test/srt/quant/test_autoround.py +++ b/test/registered/quant/test_autoround.py @@ -7,6 +7,7 @@ import unittest from types import SimpleNamespace from sglang.srt.utils import kill_process_tree +from sglang.test.ci.ci_register import register_cuda_ci from sglang.test.run_eval import run_eval from sglang.test.test_utils import ( DEFAULT_AUTOROUND_MODEL_NAME_FOR_TEST, @@ -16,6 +17,9 @@ 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") + class TestAutoRound(CustomTestCase): @classmethod diff --git a/test/srt/quant/test_awq_dequant.py b/test/registered/quant/test_awq_dequant.py similarity index 97% rename from test/srt/quant/test_awq_dequant.py rename to test/registered/quant/test_awq_dequant.py index ec1f2b16a..98460742d 100644 --- a/test/srt/quant/test_awq_dequant.py +++ b/test/registered/quant/test_awq_dequant.py @@ -16,8 +16,12 @@ from sglang.srt.layers.quantization.awq_triton import ( awq_dequantize_triton, awq_gemm_triton, ) +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/srt/quant/test_block_int8.py b/test/registered/quant/test_block_int8.py similarity index 97% rename from test/srt/quant/test_block_int8.py rename to test/registered/quant/test_block_int8.py index eefab0265..3840cbd27 100644 --- a/test/srt/quant/test_block_int8.py +++ b/test/registered/quant/test_block_int8.py @@ -7,8 +7,13 @@ from sglang.srt.layers.activation import SiluAndMul from sglang.srt.layers.moe.fused_moe_triton.fused_moe import fused_moe from sglang.srt.layers.moe.topk import TopKConfig, select_experts from sglang.srt.server_args import ServerArgs, set_global_server_args_for_scheduler +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") + # For test def native_per_token_group_quant_int8(x, group_size, eps=1e-10, dtype=torch.int8): diff --git a/test/srt/quant/test_fp8_kernel.py b/test/registered/quant/test_fp8_kernel.py similarity index 96% rename from test/srt/quant/test_fp8_kernel.py rename to test/registered/quant/test_fp8_kernel.py index 42502277b..c754ee9de 100644 --- a/test/srt/quant/test_fp8_kernel.py +++ b/test/registered/quant/test_fp8_kernel.py @@ -6,8 +6,12 @@ from sglang.srt.layers.quantization.fp8_kernel import ( per_token_group_quant_fp8, w8a8_block_fp8_matmul, ) +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") + class TestFP8Base(CustomTestCase): @classmethod diff --git a/test/srt/quant/test_fused_rms_fp8_group_quant.py b/test/registered/quant/test_fused_rms_fp8_group_quant.py similarity index 96% rename from test/srt/quant/test_fused_rms_fp8_group_quant.py rename to test/registered/quant/test_fused_rms_fp8_group_quant.py index 443c590e9..5ec57df18 100644 --- a/test/srt/quant/test_fused_rms_fp8_group_quant.py +++ b/test/registered/quant/test_fused_rms_fp8_group_quant.py @@ -1,12 +1,15 @@ -# test/srt/quant/test_fused_rms_fp8_group_quant.py import itertools import unittest import torch 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") + def _fp8_available() -> bool: # requirement:1) GPU;2) ROCm;3) torch support float8_e4m3fn diff --git a/test/srt/quant/test_int8_kernel.py b/test/registered/quant/test_int8_kernel.py similarity index 97% rename from test/srt/quant/test_int8_kernel.py rename to test/registered/quant/test_int8_kernel.py index 31414d1cd..0e09b4257 100644 --- a/test/srt/quant/test_int8_kernel.py +++ b/test/registered/quant/test_int8_kernel.py @@ -8,8 +8,12 @@ from sglang.srt.layers.moe.fused_moe_triton.fused_moe import fused_moe from sglang.srt.layers.moe.topk import TopKConfig, select_experts from sglang.srt.layers.quantization.int8_kernel import per_token_quant_int8 from sglang.srt.server_args import ServerArgs, set_global_server_args_for_scheduler +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") + def native_w8a8_per_token_matmul(A, B, As, Bs, output_dtype=torch.float16): """Matrix multiplication function that supports per-token input quantization and per-column weight quantization""" diff --git a/test/srt/quant/test_triton_scaled_mm.py b/test/registered/quant/test_triton_scaled_mm.py similarity index 93% rename from test/srt/quant/test_triton_scaled_mm.py rename to test/registered/quant/test_triton_scaled_mm.py index 72a0bbf31..38ba68ced 100644 --- a/test/srt/quant/test_triton_scaled_mm.py +++ b/test/registered/quant/test_triton_scaled_mm.py @@ -5,8 +5,13 @@ import torch import torch.testing 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") + def torch_scaled_mm( a: torch.Tensor, diff --git a/test/srt/quant/test_w8a8_quantization.py b/test/registered/quant/test_w8a8_quantization.py similarity index 94% rename from test/srt/quant/test_w8a8_quantization.py rename to test/registered/quant/test_w8a8_quantization.py index cef51f0f0..c1004ba3e 100644 --- a/test/srt/quant/test_w8a8_quantization.py +++ b/test/registered/quant/test_w8a8_quantization.py @@ -5,6 +5,7 @@ from types import SimpleNamespace import requests from sglang.srt.utils import kill_process_tree +from sglang.test.ci.ci_register import register_cuda_ci from sglang.test.few_shot_gsm8k import run_eval from sglang.test.test_utils import ( DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH, @@ -13,6 +14,9 @@ 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") + class BaseW8A8Test(CustomTestCase): model: str = None diff --git a/test/srt/run_suite.py b/test/srt/run_suite.py index 890b691c5..52be01790 100644 --- a/test/srt/run_suite.py +++ b/test/srt/run_suite.py @@ -41,12 +41,7 @@ suites = { TestFile("openai_server/validation/test_openai_server_ignore_eos.py", 6), TestFile("openai_server/validation/test_request_length_validation.py", 38), TestFile("ops/test_repeat_interleave.py", 60), - TestFile("quant/test_block_int8.py", 44), - TestFile("quant/test_fp8_kernel.py", 10), - TestFile("quant/test_int8_kernel.py", 8), - TestFile("quant/test_triton_scaled_mm.py", 8), - TestFile("quant/test_w8a8_quantization.py", 160), - TestFile("quant/test_autoround.py", 77), + # quant tests moved to test/registered/quant/ TestFile("rl/test_fp32_lm_head.py", 9), # TestFile("rl/test_update_weights_from_disk.py", 210), # Temporarily disabled, see https://github.com/sgl-project/sglang/pull/13998 TestFile("rl/test_update_weights_from_tensor.py", 195), @@ -228,10 +223,7 @@ suite_amd = { TestFile("openai_server/validation/test_openai_server_ignore_eos.py", 85), TestFile("openai_server/validation/test_request_length_validation.py", 31), TestFile("ops/test_repeat_interleave.py", 75), - TestFile("quant/test_awq_dequant.py", 2), - TestFile("quant/test_block_int8.py", 22), - TestFile("quant/test_fused_rms_fp8_group_quant.py", 10), - TestFile("quant/test_triton_scaled_mm.py", 12), + # quant tests moved to test/registered/quant/ TestFile("rl/test_fp32_lm_head.py", 15), # TestFile("rl/test_update_weights_from_disk.py", 210), # Temporarily disabled, see https://github.com/sgl-project/sglang/pull/13998 TestFile("rotary_embedding/test_mrope.py", 15),