Clean up server_args, triton cache manager (#8332)

This commit is contained in:
Lianmin Zheng
2025-07-25 14:14:51 -07:00
committed by GitHub
parent f8260f2539
commit ed2e313eb6
12 changed files with 128 additions and 204 deletions

View File

@@ -74,8 +74,6 @@ class ForwardMode(IntEnum):
MIXED = auto()
# No sequence to forward. For data parallel attention, some workers will be IDLE if no sequence are allocated.
IDLE = auto()
# Split Prefill for PD multiplexing
SPLIT_PREFILL = auto()
# Used in speculative decoding: verify a batch in the target model.
TARGET_VERIFY = auto()
@@ -86,6 +84,9 @@ class ForwardMode(IntEnum):
# It is now used for triggering the sampling_info_done event for the first prefill batch.
DUMMY_FIRST = auto()
# Split Prefill for PD multiplexing
SPLIT_PREFILL = auto()
def is_prefill(self):
return self.is_extend()
@@ -103,12 +104,12 @@ class ForwardMode(IntEnum):
def is_mixed(self):
return self == ForwardMode.MIXED
def is_split_prefill(self):
return self == ForwardMode.SPLIT_PREFILL
def is_idle(self):
return self == ForwardMode.IDLE
def is_decode_or_idle(self):
return self == ForwardMode.DECODE or self == ForwardMode.IDLE
def is_target_verify(self):
return self == ForwardMode.TARGET_VERIFY
@@ -132,8 +133,8 @@ class ForwardMode(IntEnum):
def is_dummy_first(self):
return self == ForwardMode.DUMMY_FIRST
def is_decode_or_idle(self):
return self == ForwardMode.DECODE or self == ForwardMode.IDLE
def is_split_prefill(self):
return self == ForwardMode.SPLIT_PREFILL
@total_ordering

View File

@@ -109,7 +109,6 @@ from sglang.srt.utils import (
get_bool_env_var,
get_cpu_ids_by_node,
init_custom_process_group,
is_cuda,
is_fa3_default_architecture,
is_flashinfer_available,
is_hip,