Retire the per-runner parallel record (#40343)

This commit is contained in:
Cheng Wan
2026-09-21 12:26:40 -07:00
committed by GitHub
parent 73f071db52
commit 970e946e4f
79 changed files with 395 additions and 463 deletions
@@ -11,7 +11,6 @@ from sglang.srt.disaggregation.decode import (
)
from sglang.srt.disaggregation.fake.conn import FakeKVManager, FakeKVReceiver
from sglang.srt.disaggregation.utils import DisaggregationMode
from sglang.srt.distributed.parallel_state_wrapper import ParallelState
from sglang.srt.managers.schedule_batch import FINISH_ABORT
from sglang.srt.managers.scheduler import Scheduler
from sglang.srt.runtime_context import get_context, publish, reset_context
@@ -440,7 +439,6 @@ class TestDecodeQueueCleanup(CustomTestCase):
scheduler.last_batch = None
scheduler.cur_batch_for_debug = None
scheduler.enable_overlap = False
scheduler.ps = ParallelState.trivial()
scheduler.running_mbs = []
scheduler.waiting_queue = []
scheduler.grammar_manager = SimpleNamespace(grammar_queue=[])
@@ -131,7 +131,6 @@ class TestHandlePdRoleSwitch(unittest.TestCase):
def test_rejected_when_decode_graph_headroom_is_insufficient(self):
s = self._scheduler(DisaggregationMode.PREFILL)
s.device = "cuda"
s.ps = SimpleNamespace(gpu_id=0)
s.tp_worker.get_decode_cuda_graph_bs.return_value = []
with patch.object(role_switch, "get_available_gpu_memory", return_value=0.5):
out = Scheduler.handle_pd_role_switch(
@@ -151,7 +150,6 @@ class TestHandlePdRoleSwitch(unittest.TestCase):
def test_decode_graph_headroom_allows_flip(self):
s = self._scheduler(DisaggregationMode.PREFILL)
s.device = "cuda"
s.ps = SimpleNamespace(gpu_id=0)
s.tp_worker.get_decode_cuda_graph_bs.return_value = []
with patch.object(role_switch, "get_available_gpu_memory", return_value=1.0):
out = Scheduler.handle_pd_role_switch(