94057c3d3e
PR Test (NPU) / check-changes (push) Has been cancelled
PR Test (NPU) / pr-gate (push) Has been cancelled
PR Test (NPU) / set-image-config (push) Has been cancelled
PR Test (NPU) / stage-b-test-1-npu-a2 (0) (push) Has been cancelled
PR Test (NPU) / stage-b-test-1-npu-a2 (1) (push) Has been cancelled
PR Test (NPU) / stage-b-test-2-npu-a2 (0) (push) Has been cancelled
PR Test (NPU) / stage-b-test-2-npu-a2 (1) (push) Has been cancelled
PR Test (NPU) / stage-b-test-4-npu-a3 (push) Has been cancelled
PR Test (NPU) / stage-b-test-16-npu-a3 (push) Has been cancelled
PR Test (NPU) / multimodal-gen-test-1-npu-a3 (push) Has been cancelled
PR Test (NPU) / multimodal-gen-test-2-npu-a3 (push) Has been cancelled
PR Test (Arm64) / pr-gate (push) Has been cancelled
PR Test (Arm64) / check-changes (push) Has been cancelled
PR Test (Arm64) / build-test (push) Has been cancelled
PR Test (sgl-router) / gate (push) Has been cancelled
PR Test (sgl-router) / tier-1 — lint (push) Has been cancelled
PR Test (sgl-router) / tier-2 — build + test (push) Has been cancelled
PR Test (sgl-router) / tier-3 — docker (placeholder) (push) Has been cancelled
PR Test (sgl-router) / tier-3 — k8s integration (push) Has been cancelled
PR Test (sgl-router) / tier-3 — e2e (push) Has been cancelled
PR Test (sgl-router) / finish (push) Has been cancelled
PR Test (NPU) / single-node-poc (map[name:qwen3_6_27b_w8a8_1p_in64k_out1k_50ms runner:linux-aarch64-a3-2 test_case:test/registered/ascend/performance/qwen3_6_27b/test_npu_qwen3_6_27b_w8a8_1p_in64k_out1k_50ms.py test_type:perf]) (push) Has been cancelled
PR Test (NPU) / pr-test-npu-finish (push) Has been cancelled
PR Test (Xeon) / pr-gate (push) Has been cancelled
PR Test (Xeon) / check-changes (push) Has been cancelled
PR Test (Xeon) / build-test (, xeon-gnr, base-b-test-cpu) (push) Has been cancelled
PR Test (XPU) / check-changes (push) Has been cancelled
PR Test (XPU) / pr-gate (push) Has been cancelled
PR Test (XPU) / stage-a-test-1-gpu-xpu (push) Has been cancelled
PR Test (XPU) / wait-for-stage-a (push) Has been cancelled
PR Test (XPU) / stage-b-test-1-gpu-xpu (push) Has been cancelled
PR Test (XPU) / finish (push) Has been cancelled
CI Model Inventory / build-inventory (push) Has been cancelled
Lint / lint (push) Has been cancelled
PR Benchmark (SMG Components) / Benchmark Compilation Check (push) Has been cancelled
PR Benchmark (SMG Components) / Benchmark - Manual Policy (push) Has been cancelled
PR Benchmark (SMG Components) / Benchmark - Request Processing (push) Has been cancelled
PR Benchmark (SMG Components) / Benchmark Summary (push) Has been cancelled
PR Test (SMG) / build-wheel (push) Has been cancelled
Release SGLang Model Gateway to PyPI / build on windows (x86_64 - auto) (push) Has been cancelled
Release SGLang Model Gateway to PyPI / build on macos (x86_64 - auto) (push) Has been cancelled
PR Test (SMG) / python-unit-tests (push) Has been cancelled
PR Test (SMG) / unit-tests (push) Has been cancelled
PR Test (SMG) / benchmarks (push) Has been cancelled
PR Test (SMG) / chat-completions (push) Has been cancelled
PR Test (SMG) / chat-completions-4gpu (push) Has been cancelled
PR Test (SMG) / e2e (push) Has been cancelled
PR Test (SMG) / docker-build-test (push) Has been cancelled
PR Test (SMG) / k8s-integration (push) Has been cancelled
PR Test (SMG) / finish (push) Has been cancelled
PR Test (SMG) / summarize-benchmarks (push) Has been cancelled
Release SGLang Model Gateway Docker Image / publish (push) Has been cancelled
Release SGLang Model Gateway to PyPI / build on macos (aarch64 - auto) (push) Has been cancelled
Release SGLang Model Gateway to PyPI / build on linux (aarch64 - auto) (push) Has been cancelled
Release SGLang Model Gateway to PyPI / build on linux (x86_64 - auto) (push) Has been cancelled
Release SGLang Model Gateway to PyPI / build on linux (aarch64 - musllinux_1_1) (push) Has been cancelled
Release SGLang Model Gateway to PyPI / build on linux (x86_64 - musllinux_1_1) (push) Has been cancelled
Release SGLang Model Gateway to PyPI / Build SDist (push) Has been cancelled
Release SGLang Model Gateway to PyPI / Upload to PyPI (push) Has been cancelled
Release SGLang Kernels / build-cu129-matrix (aarch64, 12.9, 3.10, arm-kernel-build-node) (push) Has been cancelled
Release SGLang Kernels / build-cu129-matrix (x86_64, 12.9, 3.10, x64-kernel-build-node) (push) Has been cancelled
Release SGLang Kernels / release-cu129 (push) Has been cancelled
Release SGLang Kernels / build-cu130-matrix (aarch64, 13.0, 3.10, arm-kernel-build-node) (push) Has been cancelled
Release SGLang Kernels / build-cu130-matrix (x86_64, 13.0, 3.10, x64-kernel-build-node) (push) Has been cancelled
Release SGLang Kernels / release-cu130 (push) Has been cancelled
Release SGLang Kernels / build-rocm-matrix (3.10, 700) (push) Has been cancelled
Release SGLang Kernels / build-rocm-matrix (3.10, 720) (push) Has been cancelled
Release SGLang Kernels / release-rocm700 (push) Has been cancelled
Release SGLang Kernels / release-rocm720 (push) Has been cancelled
Release SGLang Kernels / build-musa43 (43, 3.10) (push) Has been cancelled
Release SGLang Kernels / release-musa43 (push) Has been cancelled
119 lines
3.6 KiB
Python
119 lines
3.6 KiB
Python
"""Reverse-apply historical PR fixes for regression-style tests."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Dict
|
|
|
|
from sglang.srt.debug_utils.source_patcher import apply_patches_from_config
|
|
from sglang.srt.environ import envs
|
|
|
|
_PR_REVERT_YAML_25015 = """
|
|
patches:
|
|
- target: sglang.srt.speculative.eagle_worker_v2.EagleDraftWorker.draft_forward
|
|
edits:
|
|
- match: |
|
|
forward_batch.out_cache_loc = out_cache_loc[i]
|
|
spec_info.hidden_states = hidden_states
|
|
replacement: |
|
|
forward_batch.out_cache_loc = out_cache_loc[i]
|
|
forward_batch.positions.add_(1)
|
|
spec_info.hidden_states = hidden_states
|
|
- match: |
|
|
hidden_states = logits_output.hidden_states
|
|
forward_batch.positions.add_(1)
|
|
replacement: |
|
|
hidden_states = logits_output.hidden_states
|
|
|
|
- target: sglang.srt.speculative.eagle_draft_cuda_graph_runner.EAGLEDraftCudaGraphRunner.capture_one_shape
|
|
edits:
|
|
- match: |
|
|
forward_batch.spec_info.hidden_states = hidden_states_backup
|
|
forward_batch.positions.sub_(self.eagle_worker.speculative_num_steps - 1)
|
|
return ret
|
|
replacement: |
|
|
forward_batch.spec_info.hidden_states = hidden_states_backup
|
|
return ret
|
|
"""
|
|
|
|
|
|
_PR_REVERT_YAML_26329 = """
|
|
patches:
|
|
- target: sglang.srt.speculative.eagle_utils._eagle_prefill_tail_tokens
|
|
edits:
|
|
- match: |
|
|
tail_tokens = next_token_ids.to(batch.input_ids.dtype)
|
|
prepend: |
|
|
return next_token_ids.to(batch.input_ids.dtype)
|
|
"""
|
|
|
|
|
|
_PR_REVERT_YAML_27338 = """
|
|
patches:
|
|
- target: sglang.srt.layers.attention.flashinfer_backend.FlashInferMultiStepDraftBackend.init_cuda_graph_state
|
|
edits:
|
|
- match: |
|
|
(self.speculative_num_steps, max_bs * self.topk * self.max_context_len),
|
|
replacement: |
|
|
(self.speculative_num_steps, max_bs * self.max_context_len),
|
|
"""
|
|
|
|
|
|
_PR_REVERT_YAML_27360 = """
|
|
patches:
|
|
- target: sglang.srt.layers.attention.flashattention_backend.FlashAttentionBackend._apply_cuda_graph_metadata
|
|
edits:
|
|
- match: |
|
|
cache_loc = cache_loc[:, :decode_length]
|
|
replacement: ""
|
|
"""
|
|
|
|
|
|
_PR_REVERT_YAML_26972 = """
|
|
patches:
|
|
- target: sglang.srt.mem_cache.common.get_req_to_token_extra_context_len
|
|
edits:
|
|
- match: |
|
|
if (
|
|
server_args.speculative_algorithm is not None
|
|
and server_args.page_size > 1
|
|
and (server_args.speculative_eagle_topk or 1) > 1
|
|
):
|
|
extra = max(extra, get_alloc_reserve_per_decode(server_args))
|
|
replacement: ""
|
|
"""
|
|
|
|
|
|
_PR_REVERT_YAML_27460 = """
|
|
patches:
|
|
- target: sglang.srt.layers.attention.flashinfer_mla_backend.FlashInferMLAMultiStepDraftBackend.init_cuda_graph_state
|
|
edits:
|
|
- match: |
|
|
(self.speculative_num_steps, max_bs * self.topk * self.max_context_len),
|
|
replacement: |
|
|
(self.speculative_num_steps, max_bs * self.max_context_len),
|
|
"""
|
|
|
|
|
|
_PR_FIX_REVERT_YAML: Dict[int, str] = {
|
|
25015: _PR_REVERT_YAML_25015,
|
|
26329: _PR_REVERT_YAML_26329,
|
|
27338: _PR_REVERT_YAML_27338,
|
|
27360: _PR_REVERT_YAML_27360,
|
|
26972: _PR_REVERT_YAML_26972,
|
|
27460: _PR_REVERT_YAML_27460,
|
|
}
|
|
|
|
|
|
def maybe_revert_pr_fix() -> None:
|
|
if pr_num := envs.SGLANG_DEBUG_REVERT_PR.get():
|
|
_revert_pr_fix(pr_num)
|
|
|
|
|
|
def _revert_pr_fix(pr_num: int) -> None:
|
|
if pr_num not in _PR_FIX_REVERT_YAML:
|
|
raise NotImplementedError(
|
|
f"PR #{pr_num} revert is not registered; "
|
|
f"available: {sorted(_PR_FIX_REVERT_YAML.keys())}"
|
|
)
|
|
apply_patches_from_config(_PR_FIX_REVERT_YAML[pr_num])
|