config: the KV-cache configurator reads the bags (#34096)

This commit is contained in:
Cheng Wan
2026-08-09 14:45:42 -07:00
committed by GitHub
parent e216c2bc59
commit b4284f3eb7
6 changed files with 99 additions and 61 deletions
+8 -13
View File
@@ -191,25 +191,20 @@ class TestGetDcpLens(CustomTestCase):
)
allocators = {}
# The configurator's bag reads (disaggregation_mode / page_size /
# enable_hisparse) come from the published context; the per-iteration
# dcp_size stays on the injected instance stand-in.
self._sa_override = rc.get_context().override_server_args(
# The configurator's own inputs are published leaves now, so the case
# publishes them once. The DCP *scale* is not one of them: the allocator
# widens from the live get_parallel().attn_dcp_size, which the per-size
# override inside the loop drives.
override = rc.get_context().override_server_args(
disaggregation_mode="null",
page_size=physical_page_size,
enable_hisparse=False,
)
self._sa_override.install()
self.addCleanup(self._sa_override.restore)
override.install()
self.addCleanup(override.restore)
for dcp_size in (1, 4):
configurator = SimpleNamespace(
server_args=SimpleNamespace(
disaggregation_mode="null",
enable_hisparse=False,
page_size=physical_page_size,
dcp_size=dcp_size,
),
server_args=SimpleNamespace(),
hybrid_gdn_config=None,
is_hybrid_swa=False,
kv_cache_dtype=torch.bfloat16,