Refactor JIT kernel CI to use run_suite.py registration system (#21239)

This commit is contained in:
Lianmin Zheng
2026-03-23 21:17:27 -07:00
committed by GitHub
parent 0986bed8e2
commit 260abe1fb1
63 changed files with 312 additions and 87 deletions
+37
View File
@@ -25,6 +25,7 @@ on:
- 'nightly-test-multimodal-server-2-gpu' - 'nightly-test-multimodal-server-2-gpu'
- 'nightly-test-perf-4-gpu-b200' - 'nightly-test-perf-4-gpu-b200'
- 'nightly-test-perf-8-gpu-b200' - 'nightly-test-perf-8-gpu-b200'
- 'nightly-test-kernel-1-gpu-h100'
workflow_call: workflow_call:
inputs: inputs:
ref: ref:
@@ -76,6 +77,42 @@ jobs:
- uses: ./.github/actions/upload-cuda-coredumps - uses: ./.github/actions/upload-cuda-coredumps
if: always() if: always()
# JIT kernel full unit tests (expanded parameter ranges via SGLANG_JIT_KERNEL_RUN_FULL_TESTS)
nightly-test-kernel-1-gpu-h100:
if: github.repository == 'sgl-project/sglang' && (inputs.job_filter == '' || inputs.job_filter == 'all' || inputs.job_filter == 'nightly-test-kernel-1-gpu-h100')
runs-on: 1-gpu-h100
timeout-minutes: 240
env:
# Full jit_kernel test grids (see sglang.jit_kernel.utils.should_run_full_tests)
SGLANG_JIT_KERNEL_RUN_FULL_TESTS: "1"
# Match pr-test-jit-kernel workflow for consistent JIT warmup behavior
SGLANG_JIT_DEEPGEMM_FAST_WARMUP: true
# Allow maintenance bypass on default branch (same semantics as PR JIT workflow)
SGLANG_PR_TEST_BYPASS_MAINTENANCE_ON_MAIN: ${{ github.ref == 'refs/heads/main' && 'true' || 'false' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
- uses: ./.github/actions/check-maintenance
with:
github-token: ${{ github.token }}
- name: Install dependencies
timeout-minutes: 20
run: |
bash scripts/ci/cuda/ci_install_dependency.sh
- name: Run jit kernel nightly suite
timeout-minutes: 60
run: |
cd test
python3 run_suite.py --hw cuda --suite nightly-kernel-1-gpu --nightly --continue-on-error
- uses: ./.github/actions/upload-cuda-coredumps
if: always()
# General tests - 4 GPU H100 # General tests - 4 GPU H100
nightly-test-general-4-gpu-h100: nightly-test-general-4-gpu-h100:
if: github.repository == 'sgl-project/sglang' && (inputs.job_filter == '' || inputs.job_filter == 'all' || inputs.job_filter == 'nightly-test-general-4-gpu-h100') if: github.repository == 'sgl-project/sglang' && (inputs.job_filter == '' || inputs.job_filter == 'all' || inputs.job_filter == 'nightly-test-general-4-gpu-h100')
+4 -50
View File
@@ -56,36 +56,8 @@ jobs:
- name: Run test - name: Run test
timeout-minutes: 30 timeout-minutes: 30
run: | run: |
cd python/sglang/jit_kernel cd test/
pytest tests/ python3 run_suite.py --hw cuda --suite stage-b-kernel-unit-1-gpu-large
jit-kernel-unit-test-nightly:
if: |
github.event_name == 'schedule' &&
inputs.jit_kernel == 'true'
runs-on: 1-gpu-h100
timeout-minutes: 240
env:
SGLANG_JIT_KERNEL_RUN_FULL_TESTS: "1"
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.pr_head_sha || inputs.git_ref || github.sha }}
- uses: ./.github/actions/check-maintenance
with:
github-token: ${{ github.token }}
- name: Install dependencies
timeout-minutes: 20
run: |
bash scripts/ci/cuda/ci_install_dependency.sh
- name: Run full nightly test
timeout-minutes: 60
run: |
cd python/sglang/jit_kernel
pytest tests/
jit-kernel-benchmark-test: jit-kernel-benchmark-test:
if: | if: |
@@ -111,23 +83,5 @@ jobs:
- name: Run benchmark tests - name: Run benchmark tests
timeout-minutes: 45 timeout-minutes: 45
run: | run: |
cd python/sglang/jit_kernel/benchmark cd test/
echo "Running jit-kernel benchmark tests in CI mode..." python3 run_suite.py --hw cuda --suite stage-b-kernel-benchmark-1-gpu-large
failures=()
for bench_file in bench_*.py; do
echo "Testing $bench_file..."
if ! timeout 120 python3 "$bench_file"; then
failures+=("$bench_file")
fi
echo "Completed $bench_file"
echo "---"
done
if [ ${#failures[@]} -ne 0 ]; then
echo "The following benchmark tests failed: ${failures[*]}"
exit 1
fi
echo "All jit-kernel benchmark tests completed successfully!"
@@ -6,8 +6,11 @@ import triton.testing
from sglang.jit_kernel.awq_dequantize import awq_dequantize as jit_awq_dequantize from sglang.jit_kernel.awq_dequantize import awq_dequantize as jit_awq_dequantize
from sglang.jit_kernel.benchmark.utils import run_benchmark from sglang.jit_kernel.benchmark.utils import run_benchmark
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.utils import is_in_ci from sglang.utils import is_in_ci
register_cuda_ci(est_time=5, suite="stage-b-kernel-benchmark-1-gpu-large")
try: try:
from sgl_kernel import awq_dequantize as aot_awq_dequantize from sgl_kernel import awq_dequantize as aot_awq_dequantize
@@ -11,6 +11,9 @@ from sglang.jit_kernel.benchmark.utils import (
) )
from sglang.jit_kernel.clamp_position import clamp_position_cuda from sglang.jit_kernel.clamp_position import clamp_position_cuda
from sglang.srt.utils import get_compiler_backend from sglang.srt.utils import get_compiler_backend
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=13, suite="stage-b-kernel-benchmark-1-gpu-large")
SIZE_LIST = get_benchmark_range( SIZE_LIST = get_benchmark_range(
full_range=[2**n for n in range(4, 16)], full_range=[2**n for n in range(4, 16)],
@@ -9,8 +9,11 @@ from sgl_kernel import concat_mla_k as aot_k
from sglang.jit_kernel.benchmark.utils import run_benchmark from sglang.jit_kernel.benchmark.utils import run_benchmark
from sglang.jit_kernel.concat_mla import concat_mla_absorb_q as jit_absorb_q from sglang.jit_kernel.concat_mla import concat_mla_absorb_q as jit_absorb_q
from sglang.jit_kernel.concat_mla import concat_mla_k as jit_k from sglang.jit_kernel.concat_mla import concat_mla_k as jit_k
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.utils import is_in_ci from sglang.utils import is_in_ci
register_cuda_ci(est_time=6, suite="stage-b-kernel-benchmark-1-gpu-large")
IS_CI = is_in_ci() IS_CI = is_in_ci()
NUM_LOCAL_HEADS = 128 NUM_LOCAL_HEADS = 128
@@ -22,6 +22,13 @@ import torch
import torch.distributed as dist import torch.distributed as dist
from sglang.jit_kernel.benchmark.utils import is_in_ci from sglang.jit_kernel.benchmark.utils import is_in_ci
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(
est_time=120,
suite="stage-b-kernel-benchmark-1-gpu-large",
disabled="requires multi-GPU, self-skips in CI",
)
DTYPE_MAP = { DTYPE_MAP = {
"float16": torch.float16, "float16": torch.float16,
@@ -7,8 +7,11 @@ from flashinfer import fused_add_rmsnorm as fi_fused_add_rmsnorm
from sglang.jit_kernel.benchmark.utils import run_benchmark from sglang.jit_kernel.benchmark.utils import run_benchmark
from sglang.jit_kernel.norm import fused_add_rmsnorm as jit_fused_add_rmsnorm from sglang.jit_kernel.norm import fused_add_rmsnorm as jit_fused_add_rmsnorm
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.utils import is_in_ci from sglang.utils import is_in_ci
register_cuda_ci(est_time=6, suite="stage-b-kernel-benchmark-1-gpu-large")
IS_CI = is_in_ci() IS_CI = is_in_ci()
@@ -15,8 +15,11 @@ from sglang.multimodal_gen.runtime.layers.layernorm import (
ScaleResidualLayerNormScaleShift, ScaleResidualLayerNormScaleShift,
ScaleResidualRMSNormScaleShift, ScaleResidualRMSNormScaleShift,
) )
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.utils import is_in_ci from sglang.utils import is_in_ci
register_cuda_ci(est_time=17, suite="stage-b-kernel-benchmark-1-gpu-large")
if is_in_ci(): if is_in_ci():
B_RANGE, S_RANGE, D_RANGE = [1], [128], [1024] B_RANGE, S_RANGE, D_RANGE = [1], [128], [1024]
else: else:
@@ -14,6 +14,9 @@ from sglang.jit_kernel.benchmark.utils import (
run_benchmark, run_benchmark,
) )
from sglang.jit_kernel.hadamard import hadamard_transform from sglang.jit_kernel.hadamard import hadamard_transform
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=5, suite="stage-b-kernel-benchmark-1-gpu-large")
# AOT kernel: might not be available in all environments. # AOT kernel: might not be available in all environments.
# This is used for performance baseline comparison. # This is used for performance baseline comparison.
@@ -31,6 +31,9 @@ from sglang.jit_kernel.hicache import (
transfer_hicache_all_layer, transfer_hicache_all_layer,
transfer_hicache_one_layer, transfer_hicache_one_layer,
) )
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=29, suite="stage-b-kernel-benchmark-1-gpu-large")
DISABLE_TORCH = os.environ.get("DISABLE_TORCH", "0") == "1" DISABLE_TORCH = os.environ.get("DISABLE_TORCH", "0") == "1"
PAGE_SIZE = 1 PAGE_SIZE = 1
@@ -9,8 +9,11 @@ from flashinfer.norm import rmsnorm as fi_rmsnorm
from sglang.jit_kernel.benchmark.utils import run_benchmark from sglang.jit_kernel.benchmark.utils import run_benchmark
from sglang.jit_kernel.norm import fused_add_rmsnorm as jit_fused_add_rmsnorm from sglang.jit_kernel.norm import fused_add_rmsnorm as jit_fused_add_rmsnorm
from sglang.jit_kernel.norm import rmsnorm as jit_rmsnorm from sglang.jit_kernel.norm import rmsnorm as jit_rmsnorm
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.utils import is_in_ci from sglang.utils import is_in_ci
register_cuda_ci(est_time=5, suite="stage-b-kernel-benchmark-1-gpu-large")
IS_CI = is_in_ci() IS_CI = is_in_ci()
DTYPE = torch.bfloat16 DTYPE = torch.bfloat16
@@ -21,8 +21,15 @@ from sglang.jit_kernel.diffusion.triton.rmsnorm_onepass import triton_one_pass_r
from sglang.jit_kernel.norm import fused_add_rmsnorm as jit_fused_add_rmsnorm from sglang.jit_kernel.norm import fused_add_rmsnorm as jit_fused_add_rmsnorm
from sglang.jit_kernel.norm import rmsnorm as jit_rmsnorm from sglang.jit_kernel.norm import rmsnorm as jit_rmsnorm
from sglang.jit_kernel.utils import KERNEL_PATH from sglang.jit_kernel.utils import KERNEL_PATH
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.utils import is_in_ci from sglang.utils import is_in_ci
register_cuda_ci(
est_time=120,
suite="stage-b-kernel-benchmark-1-gpu-large",
disabled="self-skips in CI, standalone tool",
)
os.environ.setdefault("FLASHINFER_DISABLE_VERSION_CHECK", "1") os.environ.setdefault("FLASHINFER_DISABLE_VERSION_CHECK", "1")
REPO_ROOT = KERNEL_PATH.parents[2] REPO_ROOT = KERNEL_PATH.parents[2]
@@ -13,6 +13,9 @@ from sglang.jit_kernel.nvfp4 import (
scaled_fp4_quant, scaled_fp4_quant,
) )
from sglang.srt.utils import is_sm100_supported from sglang.srt.utils import is_sm100_supported
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=5, suite="stage-b-kernel-benchmark-1-gpu-large")
FLOAT4_E2M1_MAX = 6.0 FLOAT4_E2M1_MAX = 6.0
FLOAT8_E4M3_MAX = torch.finfo(torch.float8_e4m3fn).max FLOAT8_E4M3_MAX = torch.finfo(torch.float8_e4m3fn).max
@@ -8,6 +8,9 @@ import triton
from sglang.jit_kernel.benchmark.utils import get_benchmark_range, run_benchmark from sglang.jit_kernel.benchmark.utils import get_benchmark_range, run_benchmark
from sglang.jit_kernel.nvfp4 import scaled_fp4_quant from sglang.jit_kernel.nvfp4 import scaled_fp4_quant
from sglang.srt.utils import is_sm100_supported from sglang.srt.utils import is_sm100_supported
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=5, suite="stage-b-kernel-benchmark-1-gpu-large")
FLOAT4_E2M1_MAX = 6.0 FLOAT4_E2M1_MAX = 6.0
FLOAT8_E4M3_MAX = torch.finfo(torch.float8_e4m3fn).max FLOAT8_E4M3_MAX = torch.finfo(torch.float8_e4m3fn).max
@@ -8,6 +8,9 @@ import triton
from sglang.jit_kernel.benchmark.utils import get_benchmark_range, run_benchmark from sglang.jit_kernel.benchmark.utils import get_benchmark_range, run_benchmark
from sglang.jit_kernel.nvfp4 import cutlass_scaled_fp4_mm, scaled_fp4_quant from sglang.jit_kernel.nvfp4 import cutlass_scaled_fp4_mm, scaled_fp4_quant
from sglang.srt.utils import is_sm100_supported from sglang.srt.utils import is_sm100_supported
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=5, suite="stage-b-kernel-benchmark-1-gpu-large")
FLOAT4_E2M1_MAX = 6.0 FLOAT4_E2M1_MAX = 6.0
FLOAT8_E4M3_MAX = torch.finfo(torch.float8_e4m3fn).max FLOAT8_E4M3_MAX = torch.finfo(torch.float8_e4m3fn).max
@@ -6,6 +6,9 @@ import triton.testing
from sglang.jit_kernel.benchmark.utils import get_benchmark_range, run_benchmark from sglang.jit_kernel.benchmark.utils import get_benchmark_range, run_benchmark
from sglang.jit_kernel.per_tensor_quant_fp8 import per_tensor_quant_fp8 from sglang.jit_kernel.per_tensor_quant_fp8 import per_tensor_quant_fp8
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=5, suite="stage-b-kernel-benchmark-1-gpu-large")
try: try:
from vllm import _custom_ops as ops from vllm import _custom_ops as ops
@@ -17,8 +17,11 @@ from sglang.srt.layers.quantization.fp8_kernel import (
) )
from sglang.srt.utils import is_hip from sglang.srt.utils import is_hip
from sglang.srt.utils.bench_utils import bench_kineto from sglang.srt.utils.bench_utils import bench_kineto
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.utils import is_in_ci from sglang.utils import is_in_ci
register_cuda_ci(est_time=13, suite="stage-b-kernel-benchmark-1-gpu-large")
IS_CI = is_in_ci() IS_CI = is_in_ci()
_is_hip = is_hip() _is_hip = is_hip()
@@ -13,6 +13,9 @@ from sglang.jit_kernel.benchmark.utils import (
) )
from sglang.jit_kernel.norm import fused_inplace_qknorm from sglang.jit_kernel.norm import fused_inplace_qknorm
from sglang.srt.utils import get_current_device_stream_fast from sglang.srt.utils import get_current_device_stream_fast
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=10, suite="stage-b-kernel-benchmark-1-gpu-large")
alt_stream = torch.cuda.Stream() alt_stream = torch.cuda.Stream()
@@ -9,8 +9,11 @@ from sgl_kernel import rmsnorm
from sglang.jit_kernel.benchmark.utils import run_benchmark from sglang.jit_kernel.benchmark.utils import run_benchmark
from sglang.jit_kernel.norm import fused_inplace_qknorm_across_heads from sglang.jit_kernel.norm import fused_inplace_qknorm_across_heads
from sglang.srt.utils import get_current_device_stream_fast from sglang.srt.utils import get_current_device_stream_fast
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.utils import is_in_ci from sglang.utils import is_in_ci
register_cuda_ci(est_time=12, suite="stage-b-kernel-benchmark-1-gpu-large")
IS_CI = is_in_ci() IS_CI = is_in_ci()
alt_stream = torch.cuda.Stream() alt_stream = torch.cuda.Stream()
@@ -9,8 +9,11 @@ from sglang.jit_kernel.diffusion.triton.scale_shift import (
fuse_layernorm_scale_shift_gate_select01_kernel, fuse_layernorm_scale_shift_gate_select01_kernel,
fuse_residual_layernorm_scale_shift_gate_select01_kernel, fuse_residual_layernorm_scale_shift_gate_select01_kernel,
) )
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.utils import is_in_ci from sglang.utils import is_in_ci
register_cuda_ci(est_time=13, suite="stage-b-kernel-benchmark-1-gpu-large")
if is_in_ci(): if is_in_ci():
B_RANGE, S_RANGE, D_RANGE = [1], [128], [3072] B_RANGE, S_RANGE, D_RANGE = [1], [128], [3072]
else: else:
@@ -6,8 +6,11 @@ import triton
import triton.testing import triton.testing
from sglang.jit_kernel.benchmark.utils import run_benchmark_no_cudagraph from sglang.jit_kernel.benchmark.utils import run_benchmark_no_cudagraph
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.utils import is_in_ci from sglang.utils import is_in_ci
register_cuda_ci(est_time=5, suite="stage-b-kernel-benchmark-1-gpu-large")
def torch_top_k_renorm_probs(probs, top_k): def torch_top_k_renorm_probs(probs, top_k):
"""Vectorized PyTorch implementation of top-k renormalization.""" """Vectorized PyTorch implementation of top-k renormalization."""
@@ -11,6 +11,9 @@ from sglang.jit_kernel.benchmark.utils import (
) )
from sglang.jit_kernel.resolve_future_token_ids import resolve_future_token_ids_cuda from sglang.jit_kernel.resolve_future_token_ids import resolve_future_token_ids_cuda
from sglang.srt.utils import get_compiler_backend from sglang.srt.utils import get_compiler_backend
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=10, suite="stage-b-kernel-benchmark-1-gpu-large")
SIZE_LIST = get_benchmark_range( SIZE_LIST = get_benchmark_range(
full_range=[2**n for n in range(4, 16)], # 16 … 32K elements full_range=[2**n for n in range(4, 16)], # 16 … 32K elements
@@ -13,6 +13,9 @@ from sglang.jit_kernel.benchmark.utils import (
run_benchmark, run_benchmark,
) )
from sglang.jit_kernel.norm import rmsnorm as jit_rmsnorm from sglang.jit_kernel.norm import rmsnorm as jit_rmsnorm
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=21, suite="stage-b-kernel-benchmark-1-gpu-large")
def sglang_aot_rmsnorm( def sglang_aot_rmsnorm(
@@ -10,6 +10,9 @@ from sglang.jit_kernel.benchmark.utils import (
get_benchmark_range, get_benchmark_range,
run_benchmark, run_benchmark,
) )
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=6, suite="stage-b-kernel-benchmark-1-gpu-large")
MAX_SEQ_LEN = 131072 MAX_SEQ_LEN = 131072
ROPE_BASE = 10000.0 ROPE_BASE = 10000.0
@@ -12,6 +12,9 @@ from sglang.jit_kernel.benchmark.utils import (
get_benchmark_range, get_benchmark_range,
) )
from sglang.jit_kernel.kvcache import store_cache from sglang.jit_kernel.kvcache import store_cache
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=9, suite="stage-b-kernel-benchmark-1-gpu-large")
def sglang_jit_store_cache( def sglang_jit_store_cache(
+3 -3
View File
@@ -6,9 +6,6 @@ from typing import TYPE_CHECKING, Optional
import torch import torch
from sglang.jit_kernel.debug_utils import maybe_wrap_jit_kernel_debug from sglang.jit_kernel.debug_utils import maybe_wrap_jit_kernel_debug
logger = logging.getLogger(__name__)
from sglang.jit_kernel.utils import ( from sglang.jit_kernel.utils import (
cache_once, cache_once,
is_arch_support_pdl, is_arch_support_pdl,
@@ -20,6 +17,9 @@ if TYPE_CHECKING:
from tvm_ffi.module import Module from tvm_ffi.module import Module
logger = logging.getLogger(__name__)
@cache_once @cache_once
def _jit_qknorm_module(head_dim: int, dtype: torch.dtype) -> Module: def _jit_qknorm_module(head_dim: int, dtype: torch.dtype) -> Module:
args = make_cpp_args(head_dim, is_arch_support_pdl(), dtype) args = make_cpp_args(head_dim, is_arch_support_pdl(), dtype)
@@ -4,6 +4,10 @@ import pytest
import torch import torch
from sglang.jit_kernel.add_constant import add_constant from sglang.jit_kernel.add_constant import add_constant
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=45, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=180, suite="nightly-kernel-1-gpu", nightly=True)
@pytest.mark.parametrize("size", [1, 2, 127, 128, 1024, 1025]) @pytest.mark.parametrize("size", [1, 2, 127, 128, 1024, 1025])
@@ -5,6 +5,10 @@ import pytest
import torch import torch
from sglang.jit_kernel.awq_dequantize import awq_dequantize as jit_awq_dequantize from sglang.jit_kernel.awq_dequantize import awq_dequantize as jit_awq_dequantize
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=9, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
try: try:
from sgl_kernel import awq_dequantize as aot_awq_dequantize from sgl_kernel import awq_dequantize as aot_awq_dequantize
@@ -9,6 +9,10 @@ from sglang.jit_kernel.awq_marlin_repack import (
awq_marlin_moe_repack as jit_awq_marlin_moe_repack, awq_marlin_moe_repack as jit_awq_marlin_moe_repack,
) )
from sglang.srt.layers.quantization.utils import pack_cols, quantize_weights from sglang.srt.layers.quantization.utils import pack_cols, quantize_weights
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=10, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
def _has_aot_awq_marlin_moe_repack() -> bool: def _has_aot_awq_marlin_moe_repack() -> bool:
@@ -9,8 +9,12 @@ from sglang.jit_kernel.awq_marlin_repack import (
awq_marlin_repack as jit_awq_marlin_repack, awq_marlin_repack as jit_awq_marlin_repack,
) )
from sglang.srt.layers.quantization.utils import pack_cols, quantize_weights from sglang.srt.layers.quantization.utils import pack_cols, quantize_weights
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.test.test_marlin_utils import get_weight_perm, marlin_weights from sglang.test.test_marlin_utils import get_weight_perm, marlin_weights
register_cuda_ci(est_time=10, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
def _has_aot_awq_marlin_repack() -> bool: def _has_aot_awq_marlin_repack() -> bool:
return hasattr(torch.ops.sgl_kernel, "awq_marlin_repack") and hasattr( return hasattr(torch.ops.sgl_kernel, "awq_marlin_repack") and hasattr(
@@ -4,6 +4,10 @@ import pytest
import torch import torch
from sglang.jit_kernel.clamp_position import clamp_position_cuda from sglang.jit_kernel.clamp_position import clamp_position_cuda
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=12, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
def _reference_clamp_position(seq_lens): def _reference_clamp_position(seq_lens):
@@ -5,6 +5,11 @@ import pytest
import torch import torch
import triton import triton
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=17, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
def torch_concat_mla_k( def torch_concat_mla_k(
k: torch.Tensor, k_nope: torch.Tensor, k_rope: torch.Tensor k: torch.Tensor, k_nope: torch.Tensor, k_rope: torch.Tensor
@@ -18,6 +18,7 @@ import itertools
import logging import logging
import os import os
import subprocess import subprocess
import sys
from typing import Optional from typing import Optional
import pytest import pytest
@@ -30,6 +31,19 @@ from sglang.jit_kernel.all_reduce import AllReduceAlgo
from sglang.srt.distributed.device_communicators.custom_all_reduce_v2 import ( from sglang.srt.distributed.device_communicators.custom_all_reduce_v2 import (
CustomAllReduceV2, CustomAllReduceV2,
) )
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(
est_time=120,
suite="stage-b-kernel-unit-1-gpu-large",
disabled="requires multi-GPU distributed setup",
)
register_cuda_ci(
est_time=120,
suite="nightly-kernel-1-gpu",
nightly=True,
disabled="requires multi-GPU distributed setup",
)
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
# Test parameters (shared between test class and worker) # Test parameters (shared between test class and worker)
@@ -224,4 +238,7 @@ def worker_main() -> None:
if __name__ == "__main__": if __name__ == "__main__":
worker_main() if "LOCAL_RANK" in os.environ:
worker_main()
else:
sys.exit(pytest.main([__file__, "-v", "-s"]))
@@ -6,6 +6,8 @@ import numpy as np
import pytest import pytest
import torch import torch
from sglang.test.ci.ci_register import register_cuda_ci
try: try:
import cuda.bindings.driver as cuda_driver import cuda.bindings.driver as cuda_driver
import cutlass # noqa: F401 import cutlass # noqa: F401
@@ -27,6 +29,9 @@ try:
except ImportError: except ImportError:
TRITON_AVAILABLE = False TRITON_AVAILABLE = False
register_cuda_ci(est_time=5, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
def run_triton_kernel(A_log, dt_bias, q, k, v, a, b, initial_state, indices, scale): def run_triton_kernel(A_log, dt_bias, q, k, v, a, b, initial_state, indices, scale):
return fused_sigmoid_gating_delta_rule_update( return fused_sigmoid_gating_delta_rule_update(
@@ -12,6 +12,10 @@ import torch.nn.functional as F
from einops import rearrange, repeat from einops import rearrange, repeat
from sglang.jit_kernel.flash_attention_v4 import flash_attn_varlen_func from sglang.jit_kernel.flash_attention_v4 import flash_attn_varlen_func
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=120, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=900, suite="nightly-kernel-1-gpu", nightly=True)
# Skip this test on Hopper machine # Skip this test on Hopper machine
skip_condition = torch.cuda.get_device_capability() < (10, 0) skip_condition = torch.cuda.get_device_capability() < (10, 0)
@@ -5,6 +5,10 @@ import pytest
import torch import torch
from sglang.jit_kernel.utils import get_ci_test_range from sglang.jit_kernel.utils import get_ci_test_range
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=5, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
def sglang_jit_fused_add_rmsnorm( def sglang_jit_fused_add_rmsnorm(
@@ -14,6 +14,11 @@ import time
import pytest import pytest
import torch import torch
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=100, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=400, suite="nightly-kernel-1-gpu", nightly=True)
# ============================================================================= # =============================================================================
# Helper Functions # Helper Functions
# ============================================================================= # =============================================================================
@@ -10,6 +10,10 @@ from sglang.jit_kernel.diffusion.cutedsl.scale_residual_norm_scale_shift import
fused_norm_scale_shift, fused_norm_scale_shift,
fused_scale_residual_norm_scale_shift, fused_scale_residual_norm_scale_shift,
) )
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=28, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
DEVICE = "cuda" DEVICE = "cuda"
SHAPE_MAP = { SHAPE_MAP = {
@@ -22,6 +22,8 @@ from typing import Optional, Tuple
import pytest import pytest
import torch import torch
from sglang.test.ci.ci_register import register_cuda_ci
try: try:
from sglang.jit_kernel.fused_store_index_cache import ( from sglang.jit_kernel.fused_store_index_cache import (
can_use_nsa_fused_store, can_use_nsa_fused_store,
@@ -46,6 +48,9 @@ try:
except ImportError: except ImportError:
_is_fp8_fnuz = False _is_fp8_fnuz = False
register_cuda_ci(est_time=24, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
PAGE_SIZE = 64 PAGE_SIZE = 64
HEAD_DIM = 128 HEAD_DIM = 128
FP8_E4M3_MAX = 448.0 FP8_E4M3_MAX = 448.0
@@ -11,6 +11,8 @@ import sys
import pytest import pytest
import torch import torch
from sglang.test.ci.ci_register import register_cuda_ci
try: try:
from sglang.srt.layers.attention.fla.fused_gdn_gating import fused_gdn_gating from sglang.srt.layers.attention.fla.fused_gdn_gating import fused_gdn_gating
from sglang.srt.layers.attention.fla.fused_recurrent import ( from sglang.srt.layers.attention.fla.fused_recurrent import (
@@ -24,6 +26,9 @@ try:
except ImportError: except ImportError:
KERNELS_AVAILABLE = False KERNELS_AVAILABLE = False
register_cuda_ci(est_time=6, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
def _make_tensors(N, T, H, HV, K, V, device="cuda", seed=2025): def _make_tensors(N, T, H, HV, K, V, device="cuda", seed=2025):
"""Create input tensors for GDN target_verify.""" """Create input tensors for GDN target_verify."""
@@ -6,8 +6,12 @@ from sgl_kernel.scalar_type import scalar_types
from sglang.jit_kernel.gptq_marlin import gptq_marlin_gemm from sglang.jit_kernel.gptq_marlin import gptq_marlin_gemm
from sglang.srt.layers.quantization.marlin_utils import marlin_make_workspace from sglang.srt.layers.quantization.marlin_utils import marlin_make_workspace
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.test.test_marlin_utils import awq_marlin_quantize, marlin_quantize from sglang.test.test_marlin_utils import awq_marlin_quantize, marlin_quantize
register_cuda_ci(est_time=13, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
MNK_FACTORS = [ MNK_FACTORS = [
(1, 1, 1), (1, 1, 1),
(1, 4, 8), (1, 4, 8),
@@ -10,8 +10,12 @@ from sglang.srt.layers.quantization.utils import (
pack_rows, pack_rows,
sort_weights, sort_weights,
) )
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.test.test_marlin_utils import get_weight_perm, marlin_weights from sglang.test.test_marlin_utils import get_weight_perm, marlin_weights
register_cuda_ci(est_time=16, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
MARLIN_K_CHUNKS = [128] MARLIN_K_CHUNKS = [128]
MARLIN_N_CHUNKS = [64, 256] MARLIN_N_CHUNKS = [64, 256]
@@ -14,6 +14,10 @@ from sglang.jit_kernel.hadamard import (
hadamard_transform_28n, hadamard_transform_28n,
hadamard_transform_40n, hadamard_transform_40n,
) )
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=128, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=512, suite="nightly-kernel-1-gpu", nightly=True)
# Exact M×N Hadamard matrices (±1 entries) copied from # Exact M×N Hadamard matrices (±1 entries) copied from
# python/sglang/jit_kernel/csrc/fast-hadamard-transform/code_gen.py. # python/sglang/jit_kernel/csrc/fast-hadamard-transform/code_gen.py.
@@ -11,7 +11,8 @@ import torch
from sglang.jit_kernel.moe_lora_align import moe_lora_align_block_size from sglang.jit_kernel.moe_lora_align import moe_lora_align_block_size
from sglang.test.ci.ci_register import register_cuda_ci from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=80, suite="stage-b-test-1-gpu-large") register_cuda_ci(est_time=28, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
def round_up(x, base): def round_up(x, base):
@@ -7,8 +7,12 @@ from sgl_kernel.scalar_type import scalar_types
from sglang.jit_kernel.moe_wna16_marlin import moe_wna16_marlin_gemm from sglang.jit_kernel.moe_wna16_marlin import moe_wna16_marlin_gemm
from sglang.srt.layers.moe.fused_moe_triton import moe_align_block_size from sglang.srt.layers.moe.fused_moe_triton import moe_align_block_size
from sglang.test.ci.ci_register import register_cuda_ci
from sglang.test.test_marlin_utils import awq_marlin_quantize, marlin_quantize from sglang.test.test_marlin_utils import awq_marlin_quantize, marlin_quantize
register_cuda_ci(est_time=10, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
def _has_aot_moe_wna16_marlin_gemm() -> bool: def _has_aot_moe_wna16_marlin_gemm() -> bool:
return hasattr(torch.ops.sgl_kernel, "moe_wna16_marlin_gemm") and hasattr( return hasattr(torch.ops.sgl_kernel, "moe_wna16_marlin_gemm") and hasattr(
@@ -5,6 +5,11 @@ import sys
import pytest import pytest
import torch import torch
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=125, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=500, suite="nightly-kernel-1-gpu", nightly=True)
# JIT rmsnorm: fp16/bf16 only # JIT rmsnorm: fp16/bf16 only
# - Warp norm path (one warp per token): hidden_size in {64, 128, 256} # - Warp norm path (one warp per token): hidden_size in {64, 128, 256}
# - CTA norm path (multi-warp per token): hidden_size is a multiple of 256, > 256, and <=8192 # - CTA norm path (multi-warp per token): hidden_size is a multiple of 256, > 256, and <=8192
@@ -1,3 +1,5 @@
import sys
import pytest import pytest
import torch import torch
@@ -6,6 +8,10 @@ from sglang.jit_kernel.nvfp4 import (
scaled_fp4_experts_quant, scaled_fp4_experts_quant,
scaled_fp4_quant, scaled_fp4_quant,
) )
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=5, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
FLOAT4_E2M1_MAX = 6.0 FLOAT4_E2M1_MAX = 6.0
FLOAT8_E4M3_MAX = torch.finfo(torch.float8_e4m3fn).max FLOAT8_E4M3_MAX = torch.finfo(torch.float8_e4m3fn).max
@@ -125,3 +131,7 @@ def test_nvfp4_blockwise_moe_grouped_mm(dtype: torch.dtype) -> None:
ref[start:end] = torch.matmul(a[start:end], b[i].t()) ref[start:end] = torch.matmul(a[start:end], b[i].t())
torch.testing.assert_close(out, ref, atol=1e-1, rtol=1e-1) torch.testing.assert_close(out, ref, atol=1e-1, rtol=1e-1)
if __name__ == "__main__":
sys.exit(pytest.main([__file__, "-v", "-s"]))
@@ -1,7 +1,13 @@
import sys
import pytest import pytest
import torch import torch
from sglang.jit_kernel.nvfp4 import cutlass_scaled_fp4_mm, scaled_fp4_quant from sglang.jit_kernel.nvfp4 import cutlass_scaled_fp4_mm, scaled_fp4_quant
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=5, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
def _nvfp4_supported() -> bool: def _nvfp4_supported() -> bool:
@@ -140,3 +146,7 @@ def test_nvfp4_gemm(dtype: torch.dtype, shape: tuple[int, int, int]) -> None:
) )
torch.testing.assert_close(out, expected_out.to(dtype=dtype), atol=1e-1, rtol=1e-1) torch.testing.assert_close(out, expected_out.to(dtype=dtype), atol=1e-1, rtol=1e-1)
if __name__ == "__main__":
sys.exit(pytest.main([__file__, "-v", "-s"]))
@@ -1,3 +1,5 @@
import sys
import pytest import pytest
import torch import torch
@@ -12,6 +14,11 @@ try:
except Exception: except Exception:
_sgl_silu_and_mul = None _sgl_silu_and_mul = None
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=5, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
def _nvfp4_supported() -> bool: def _nvfp4_supported() -> bool:
return torch.cuda.is_available() and torch.cuda.get_device_capability() >= (10, 0) return torch.cuda.is_available() and torch.cuda.get_device_capability() >= (10, 0)
@@ -212,3 +219,7 @@ def test_silu_and_mul_quantize_to_fp4_grouped(shape: tuple[int, int, int]) -> No
scale_ref = recover_swizzled_scales(ref_output_scales[i], m, k) scale_ref = recover_swizzled_scales(ref_output_scales[i], m, k)
scale_ans = recover_swizzled_scales(output_scales[i], m, k) scale_ans = recover_swizzled_scales(output_scales[i], m, k)
torch.testing.assert_close(scale_ref[: mask[i]], scale_ans[: mask[i]]) torch.testing.assert_close(scale_ref[: mask[i]], scale_ans[: mask[i]])
if __name__ == "__main__":
sys.exit(pytest.main([__file__, "-v", "-s"]))
@@ -6,6 +6,10 @@ import pytest
import torch import torch
from sglang.jit_kernel.per_tensor_quant_fp8 import per_tensor_quant_fp8 from sglang.jit_kernel.per_tensor_quant_fp8 import per_tensor_quant_fp8
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=16, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
try: try:
from sglang.srt.utils import is_hip from sglang.srt.utils import is_hip
@@ -23,6 +23,10 @@ from sglang.srt.layers.quantization.fp8_kernel import (
from sglang.srt.layers.quantization.fp8_kernel import ( from sglang.srt.layers.quantization.fp8_kernel import (
per_token_group_quant_8bit as triton_per_token_group_quant_8bit, per_token_group_quant_8bit as triton_per_token_group_quant_8bit,
) )
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=16, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
configs = list( configs = list(
itertools.product( itertools.product(
@@ -8,6 +8,10 @@ import triton
import triton.language as tl import triton.language as tl
from sglang.jit_kernel.rope import rotary_embedding from sglang.jit_kernel.rope import rotary_embedding
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=18, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
@triton.jit @triton.jit
@@ -6,6 +6,10 @@ import torch
import triton import triton
from sglang.jit_kernel.utils import get_ci_test_range from sglang.jit_kernel.utils import get_ci_test_range
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=37, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=148, suite="nightly-kernel-1-gpu", nightly=True)
def sglang_aot_qknorm( def sglang_aot_qknorm(
@@ -6,6 +6,10 @@ import torch
import triton import triton
from sglang.jit_kernel.utils import get_ci_test_range from sglang.jit_kernel.utils import get_ci_test_range
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=15, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
def sglang_jit_qknorm_across_heads( def sglang_jit_qknorm_across_heads(
@@ -10,6 +10,10 @@ from sglang.jit_kernel.diffusion.triton.scale_shift import (
fuse_residual_layernorm_scale_shift_gate_select01_kernel, fuse_residual_layernorm_scale_shift_gate_select01_kernel,
) )
from sglang.jit_kernel.utils import get_ci_test_range from sglang.jit_kernel.utils import get_ci_test_range
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=15, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
DEVICE = "cuda" DEVICE = "cuda"
DTYPES = get_ci_test_range( DTYPES = get_ci_test_range(
@@ -7,6 +7,11 @@ import pytest
import sgl_kernel import sgl_kernel
import torch import torch
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=6, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
@pytest.mark.parametrize("batch_size", [1, 99, 989]) @pytest.mark.parametrize("batch_size", [1, 99, 989])
@pytest.mark.parametrize("vocab_size", [111, 32000, 128256]) @pytest.mark.parametrize("vocab_size", [111, 32000, 128256])
@@ -4,6 +4,10 @@ import pytest
import torch import torch
from sglang.jit_kernel.resolve_future_token_ids import resolve_future_token_ids_cuda from sglang.jit_kernel.resolve_future_token_ids import resolve_future_token_ids_cuda
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=9, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
def _reference_resolve(input_ids, future_map): def _reference_resolve(input_ids, future_map):
@@ -6,6 +6,10 @@ import torch
import triton import triton
from sglang.jit_kernel.utils import get_ci_test_range from sglang.jit_kernel.utils import get_ci_test_range
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=18, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
def sglang_jit_rmsnorm(input: torch.Tensor, weight: torch.Tensor) -> None: def sglang_jit_rmsnorm(input: torch.Tensor, weight: torch.Tensor) -> None:
@@ -5,6 +5,10 @@ import torch
import triton import triton
from sglang.jit_kernel.utils import get_ci_test_range from sglang.jit_kernel.utils import get_ci_test_range
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=64, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=256, suite="nightly-kernel-1-gpu", nightly=True)
DEVICE = "cuda" DEVICE = "cuda"
DTYPE = torch.bfloat16 DTYPE = torch.bfloat16
@@ -6,6 +6,10 @@ import torch
from sglang.jit_kernel.kvcache import can_use_store_cache, store_cache from sglang.jit_kernel.kvcache import can_use_store_cache, store_cache
from sglang.jit_kernel.utils import get_ci_test_range from sglang.jit_kernel.utils import get_ci_test_range
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=28, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
BS_LIST = [2**n for n in range(0, 15)] BS_LIST = [2**n for n in range(0, 15)]
BS_LIST += [x + 1 + i for i, x in enumerate(BS_LIST)] BS_LIST += [x + 1 + i for i, x in enumerate(BS_LIST)]
@@ -14,6 +14,10 @@ from sglang.jit_kernel.timestep_embedding import (
timestep_embedding as timestep_embedding_cuda, timestep_embedding as timestep_embedding_cuda,
) )
from sglang.jit_kernel.utils import get_ci_test_range from sglang.jit_kernel.utils import get_ci_test_range
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=16, suite="stage-b-kernel-unit-1-gpu-large")
register_cuda_ci(est_time=120, suite="nightly-kernel-1-gpu", nightly=True)
CORRECTNESS_BATCH_SIZES = get_ci_test_range( CORRECTNESS_BATCH_SIZES = get_ci_test_range(
[1, 2, 8, 128, 256, 512, 1536, 2048, 4096, 11008, 16384], [1, 2, 8, 128, 256, 512, 1536, 2048, 4096, 11008, 16384],
-30
View File
@@ -1,30 +0,0 @@
#!/bin/bash
set -euxo pipefail
# This script is used for release.
# It tags all remote branches starting with 'v' with the same name as the branch,
# deletes the corresponding branches from the remote, and pushes the tags to the remote repository.
git fetch origin --prune
# List all branches starting with 'v'
branches=$(git branch -r | grep 'origin/v' | sed 's/origin\///')
# Loop through each branch
for branch in $branches; do
echo "Processing branch: $branch"
# Get the commit hash for the branch
commit_hash=$(git rev-parse origin/$branch)
# Create a tag with the same name as the branch using the commit hash
git tag $branch $commit_hash
# Delete the branch from the remote
git push origin --delete $branch
done
# Push all tags to the remote repository
git push --tags
echo "All branches starting with 'v' have been tagged, deleted from remote, and pushed to the remote repository."
+13 -2
View File
@@ -41,6 +41,8 @@ PER_COMMIT_SUITES = {
"stage-b-test-1-gpu-large", "stage-b-test-1-gpu-large",
"stage-b-test-2-gpu-large", "stage-b-test-2-gpu-large",
"stage-b-test-4-gpu-b200", "stage-b-test-4-gpu-b200",
"stage-b-kernel-unit-1-gpu-large",
"stage-b-kernel-benchmark-1-gpu-large",
"stage-c-test-4-gpu-h100", "stage-c-test-4-gpu-h100",
"stage-c-test-4-gpu-b200", "stage-c-test-4-gpu-b200",
"stage-c-test-4-gpu-gb200", "stage-c-test-4-gpu-gb200",
@@ -73,6 +75,7 @@ NIGHTLY_SUITES = {
"nightly-8-gpu-h200-basic", # Basic tests for large models on H200 "nightly-8-gpu-h200-basic", # Basic tests for large models on H200
"nightly-8-gpu-b200-basic", # Basic tests for large models on B200 "nightly-8-gpu-b200-basic", # Basic tests for large models on B200
"nightly-8-gpu-common", # Common tests that run on both H200 and B200 "nightly-8-gpu-common", # Common tests that run on both H200 and B200
"nightly-kernel-1-gpu",
# Eval and perf suites (2-gpu) # Eval and perf suites (2-gpu)
"nightly-eval-text-2-gpu", "nightly-eval-text-2-gpu",
"nightly-eval-vlm-2-gpu", "nightly-eval-vlm-2-gpu",
@@ -170,9 +173,11 @@ def run_a_suite(args):
auto_partition_id = args.auto_partition_id auto_partition_id = args.auto_partition_id
auto_partition_size = args.auto_partition_size auto_partition_size = args.auto_partition_size
# All tests (per-commit and nightly) are now in registered/
# Use absolute paths so the script works from any working directory # Use absolute paths so the script works from any working directory
script_dir = os.path.dirname(os.path.abspath(__file__)) script_dir = os.path.dirname(os.path.abspath(__file__))
repo_root = os.path.dirname(script_dir)
# Registered tests under test/registered/
files = [ files = [
f f
for f in glob.glob( for f in glob.glob(
@@ -180,7 +185,13 @@ def run_a_suite(args):
) )
if not f.endswith("/conftest.py") and not f.endswith("/__init__.py") if not f.endswith("/conftest.py") and not f.endswith("/__init__.py")
] ]
# Strict: all registered files must have proper registration
# JIT kernel tests and benchmarks (live alongside kernel source)
jit_kernel_dir = os.path.join(repo_root, "python", "sglang", "jit_kernel")
files += glob.glob(os.path.join(jit_kernel_dir, "tests", "test_*.py"))
files += glob.glob(os.path.join(jit_kernel_dir, "benchmark", "bench_*.py"))
# Strict: all discovered files must have proper registration
sanity_check = True sanity_check = True
all_tests = collect_tests(files, sanity_check=sanity_check) all_tests = collect_tests(files, sanity_check=sanity_check)