[KV canary] Expect sweep counters on the target runner only (#43286)
This commit is contained in:
@@ -134,6 +134,7 @@ class CanaryManager:
|
||||
)
|
||||
self._health_checker = KernelRunCounterHealthChecker(
|
||||
config=config,
|
||||
is_draft_runner=is_eagle_draft_decode,
|
||||
device_state=self._device_state,
|
||||
active_tags=self._active_tags,
|
||||
outer_step_counter_getter=self._get_outer_step_counter,
|
||||
|
||||
@@ -31,12 +31,14 @@ class KernelRunCounterHealthChecker:
|
||||
self,
|
||||
*,
|
||||
config: CanaryConfig,
|
||||
is_draft_runner: bool,
|
||||
device_state: CanaryDeviceState,
|
||||
active_tags: tuple[CanaryLaunchTag, ...],
|
||||
outer_step_counter_getter: Callable[[], int],
|
||||
d2h_stream: torch.Stream,
|
||||
) -> None:
|
||||
self._config = config
|
||||
self._is_draft_runner = is_draft_runner
|
||||
self._device_state = device_state
|
||||
self._active_tags = active_tags
|
||||
self._outer_step_counter_getter = outer_step_counter_getter
|
||||
@@ -76,6 +78,8 @@ class KernelRunCounterHealthChecker:
|
||||
|
||||
def _expected_active_tags_for_health_check(self) -> tuple[CanaryLaunchTag, ...]:
|
||||
tags = self._active_tags
|
||||
if self._config.sweep_interval <= 0:
|
||||
# The scheduler attaches the radix cache only to the target runner, so
|
||||
# only its sweep launches; a missing attach there must still fail here.
|
||||
if self._config.sweep_interval <= 0 or self._is_draft_runner:
|
||||
tags = tuple(tag for tag in tags if tag not in _SWEEP_TAGS)
|
||||
return tuple(tag for tag in tags if passes_v_half_gate(tag))
|
||||
|
||||
@@ -74,6 +74,7 @@ def make_manager(
|
||||
req_pool: SimpleNamespace | None = None,
|
||||
per_forward_verify_capacity: int = 16,
|
||||
speculative_num_steps: int = 1,
|
||||
is_eagle_draft_decode: bool = False,
|
||||
) -> CanaryManager:
|
||||
if config is None:
|
||||
config = make_config()
|
||||
@@ -95,6 +96,7 @@ def make_manager(
|
||||
per_forward_write_entry_capacity=8,
|
||||
),
|
||||
speculative_num_steps=speculative_num_steps,
|
||||
is_eagle_draft_decode=is_eagle_draft_decode,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user