config: a parallel size has one spelling; a patched scope declares its own (#36621)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
ca1d7ed8e6
commit
fd40a331bf
@@ -609,9 +609,9 @@ class CPUGraphRunner:
|
||||
self.enable_profile_cuda_graph = (
|
||||
model_runner.server_args.enable_profile_cuda_graph
|
||||
)
|
||||
self.tp_size = get_parallel().config.tp_size
|
||||
self.tp_size = get_parallel().tp_size
|
||||
self.dp_size = get_parallel().dp_size
|
||||
self.pp_size = get_parallel().config.pp_size
|
||||
self.pp_size = get_parallel().pp_size
|
||||
|
||||
self.capture_forward_mode = ForwardMode.DECODE
|
||||
self.capture_hidden_mode = self.return_hidden_states_mode
|
||||
|
||||
@@ -240,7 +240,7 @@ def _resolve_dflash_draft_cell_size(
|
||||
draft_model_config=draft_model_config,
|
||||
draft_num_layers=draft_num_layers,
|
||||
draft_kv_cache_dtype=draft_kv_cache_dtype,
|
||||
tp_size=get_parallel().config.tp_size,
|
||||
tp_size=get_parallel().tp_size,
|
||||
)
|
||||
except Exception as e: # noqa: BLE001
|
||||
logger.warning(
|
||||
|
||||
@@ -119,10 +119,10 @@ class StartupWeightLoadOptions:
|
||||
prefill_cuda_graph_backend=cuda_graph_config.prefill.backend,
|
||||
is_draft_worker=is_draft_worker,
|
||||
speculative_algorithm=get_spec().speculative_algorithm,
|
||||
tp_size=get_parallel().config.tp_size,
|
||||
attn_cp_size=get_parallel().config.attn_cp_size,
|
||||
dcp_size=get_parallel().config.dcp_size,
|
||||
pp_size=get_parallel().config.pp_size,
|
||||
tp_size=get_parallel().tp_size,
|
||||
attn_cp_size=get_parallel().attn_cp_size,
|
||||
dcp_size=get_parallel().dcp_size,
|
||||
pp_size=get_parallel().pp_size,
|
||||
dp_size=get_parallel().dp_size,
|
||||
ep_size=get_parallel().ep_size,
|
||||
cpu_offload_gb=get_exec().offload.cpu_offload_gb,
|
||||
|
||||
@@ -216,10 +216,10 @@ class BaseRunner(ABC):
|
||||
self.model_runner = model_runner
|
||||
self.device = model_runner.device
|
||||
self.device_module = torch.get_device_module(self.device)
|
||||
self.tp_size = get_parallel().config.tp_size
|
||||
self.tp_size = get_parallel().tp_size
|
||||
# elastic-EP scale-up rewrites dp_size on the published config
|
||||
self.dp_size = get_parallel().dp_size
|
||||
self.pp_size = get_parallel().config.pp_size
|
||||
self.pp_size = get_parallel().pp_size
|
||||
self.enable_pdmux = model_runner.server_args.enable_pdmux
|
||||
self.return_hidden_states_mode = (
|
||||
CaptureHiddenMode.NULL
|
||||
@@ -349,7 +349,7 @@ class BaseRunner(ABC):
|
||||
vocab_size=mr.model_config.vocab_size,
|
||||
dtype=mr.model_config.dtype,
|
||||
dp_size=get_parallel().dp_size,
|
||||
pp_size=get_parallel().config.pp_size,
|
||||
pp_size=get_parallel().pp_size,
|
||||
is_encoder_decoder=mr.model_config.is_encoder_decoder,
|
||||
require_mlp_tp_gather=require_mlp_tp_gather(),
|
||||
seq_len_fill_value=mr.attn_backend.get_cuda_graph_seq_len_fill_value(),
|
||||
@@ -521,7 +521,7 @@ class BaseRunner(ABC):
|
||||
extend_prefix_lens = None
|
||||
extend_start_loc = None
|
||||
|
||||
if get_parallel().config.pp_size > 1:
|
||||
if get_parallel().pp_size > 1:
|
||||
# PP0 already cp-split hidden_states before send.
|
||||
pp_hidden_tokens = num_tokens
|
||||
if (
|
||||
@@ -645,7 +645,7 @@ class BaseRunner(ABC):
|
||||
|
||||
kwargs = {}
|
||||
if (
|
||||
get_parallel().config.pp_size > 1
|
||||
get_parallel().pp_size > 1
|
||||
and "pp_proxy_tensors" in inspect.signature(mr.model.forward).parameters
|
||||
):
|
||||
kwargs["pp_proxy_tensors"] = PPProxyTensors(
|
||||
|
||||
Reference in New Issue
Block a user