[CI] Fix stale ServerArgs fake in chunked-SGMV LoRA test (#38315)

This commit is contained in:
Mohammad Miadh Angkad
2026-09-07 04:25:12 -07:00
committed by GitHub
parent 755f97c622
commit c5367fa964
@@ -34,6 +34,7 @@ from sglang.kernels.ops.gemm.kv_b_lora_absorbed import (
from sglang.srt.lora.backend.chunked_backend import ChunkedSgmvLoRABackend
from sglang.srt.lora.utils import LoRABatchInfo
from sglang.srt.model_executor.forward_batch_info import ForwardMode
from sglang.srt.runtime_context import get_context
from sglang.test.ci.ci_register import register_cuda_ci
register_cuda_ci(est_time=60, stage="base-b-kernel-unit", runner_config="1-gpu-large")
@@ -186,13 +187,15 @@ def test_prepare_batch_neutralizes_static_tail_segments():
self.batch_size = batch_size
self.forward_mode = ForwardMode.DECODE
server_args = type("ServerArgs", (), {"max_lora_chunk_size": 16})
with get_context().override_server_args(max_lora_chunk_size=16) as server_args:
backend = ChunkedSgmvLoRABackend(
max_loras_per_batch=NUM_LORAS,
device=torch.device("cuda"),
server_args=server_args,
)
backend.init_cuda_graph_batch_info(max_bs_in_cuda_graph=BS, num_tokens_per_req=1)
backend.init_cuda_graph_batch_info(
max_bs_in_cuda_graph=BS, num_tokens_per_req=1
)
lora_ranks = [MAX_RANK] * NUM_LORAS
scalings = [1.0] * NUM_LORAS