config: spell out the one dynamic config read the census could not see
`_is_dsa_active` asked `getattr(server_args, "_is_dsa_model_arch", False)`, and that name has never existed on `ServerArgs` -- it arrived as a placeholder with the CP strategy abstractions (#27313), so the getattr default has always decided the predicate. A dynamic read of a name nothing sets is the one shape the config census cannot follow, and it looked like a live decision while being dead. Spelled as the constant it evaluates to, with the placeholder written down: what it should ask (whether this process runs a DSA model arch) is the CP path's call, and its only consumer, `ContextParallelStrategy.per_layer_attn_cp_comm`, has no readers yet. That was the sole entry in the read ratchet's `_INERT_DYNAMIC_READS`, so the exemption list is gone with it -- there is no way to exempt a read from the baselines any more, which is the invariant worth having. The `counted()` indirection it existed for goes too (verified the three shapes it guarded still report: direct, `getattr`, and an attribute-parked alias).
This commit is contained in:
@@ -230,16 +230,8 @@ class ContextParallelStrategy(ABC):
|
||||
|
||||
|
||||
def _is_dsa_active() -> bool:
|
||||
from sglang.srt.runtime_context import get_parallel, get_server_args
|
||||
|
||||
# `_is_dsa_model_arch` is set nowhere in the tree, so this predicate is
|
||||
# inert today (the getattr default makes it False). Kept verbatim rather
|
||||
# than "fixed" here, because deciding what it should name is the CP path's
|
||||
# call; the ratchet exempts it with that reason.
|
||||
return bool(
|
||||
get_parallel().enable_prefill_cp
|
||||
and getattr(get_server_args(), "_is_dsa_model_arch", False)
|
||||
)
|
||||
# Placeholder: a real answer needs the model architecture, not config.
|
||||
return False
|
||||
|
||||
|
||||
_STRATEGY: Optional[ContextParallelStrategy] = None
|
||||
|
||||
@@ -3527,6 +3527,9 @@ class ServerArgs:
|
||||
] = None
|
||||
|
||||
def __post_init__(self):
|
||||
self._run_resolution_pipeline()
|
||||
|
||||
def _run_resolution_pipeline(self):
|
||||
"""
|
||||
Orchestrates the handling of various server arguments, ensuring proper configuration and validation.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user