[Config] Round 5.1: the published-side readers ask the bags, and a platform fact gets one address (#37086)

This commit is contained in:
Cheng Wan
2026-08-30 02:18:33 -07:00
committed by GitHub
parent a6e4021368
commit 7e751153eb
148 changed files with 1585 additions and 1114 deletions
@@ -16,6 +16,7 @@ from sglang.test.test_utils import CustomTestCase
register_cuda_ci(est_time=10, stage="base-b", runner_config="1-gpu-small")
from sglang.srt.model_executor.forward_batch_info import ForwardMode
from sglang.srt.runtime_context import override_platform
from sglang.srt.speculative import dflash_info
from sglang.srt.speculative.dflash_info import DFlashVerifyInput
@@ -29,6 +30,9 @@ def _lazy_view(**overrides):
mamba_track_interval=256,
page_size=64,
chunked_prefill_size=None,
# The cases name a supported arch, so the view states the backend
# rather than the answer.
linear_attn_backend="triton",
)
for key, value in overrides.items():
setattr(view, key, value)
@@ -39,15 +43,9 @@ class TestValidateMambaExtraBufferLazyDflash(CustomTestCase):
"""The DFLASH rejection is gone; the neighboring invariants still hold."""
def _validate(self, view):
with mock.patch(
"sglang.srt.arg_groups.overrides.supports_mamba_cache_extra_buffer",
return_value=True,
), mock.patch(
# Keep the test runnable on CPU-only hosts: the platform assert is
# not what is under test here.
"sglang.srt.arg_groups.mamba_hook.is_cuda",
return_value=True,
):
# Keep the test runnable on CPU-only hosts: the platform assert is
# not what is under test here.
with override_platform(is_cuda=True):
validate_mamba_extra_buffer(
view,
"Qwen3NextForCausalLM",
@@ -81,10 +79,7 @@ class TestValidateMambaExtraBufferLazyDflash(CustomTestCase):
def _must_not_be_read():
raise AssertionError("the chunk size was read before page_size resolved")
with mock.patch(
"sglang.srt.arg_groups.overrides.supports_mamba_cache_extra_buffer",
return_value=True,
), mock.patch("sglang.srt.arg_groups.mamba_hook.is_cuda", return_value=True):
with override_platform(is_cuda=True):
validate_mamba_extra_buffer(
_lazy_view(page_size=None),
"Qwen3NextForCausalLM",