Introduce ModelRunner.ps ParallelState (#31161)

This commit is contained in:
fzyzcjy
2026-07-14 16:01:14 +08:00
committed by GitHub
parent 1dc48c2c3b
commit 725920915f
28 changed files with 202 additions and 276 deletions
@@ -9,6 +9,7 @@ from sglang.srt.disaggregation.decode import (
HiCacheRestoreResult,
)
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.test.ci.ci_register import register_cpu_ci
@@ -195,7 +196,7 @@ class TestDecodeQueueCleanup(CustomTestCase):
scheduler.last_batch = None
scheduler.cur_batch_for_debug = None
scheduler.enable_overlap = False
scheduler.ps = SimpleNamespace(pp_size=1)
scheduler.ps = ParallelState.trivial()
scheduler.running_mbs = []
scheduler.waiting_queue = []
scheduler.grammar_manager = SimpleNamespace(grammar_queue=[])