[Core] Scope PCP-DP validation to GPU manager (#54523)
Signed-off-by: QiuChunshuo <qiuchunshuo@huawei.com>
This commit is contained in:
@@ -547,8 +547,6 @@ class ParallelConfig:
|
||||
tp = self.tensor_parallel_size
|
||||
pcp = self.prefill_context_parallel_size
|
||||
dcp = self.decode_context_parallel_size
|
||||
if pcp > 1 and self.data_parallel_size > 1:
|
||||
raise ValueError("PCP does not support data parallelism yet.")
|
||||
if pcp == 1:
|
||||
# DCP reuses the TP ranks when PCP is disabled.
|
||||
if tp % dcp != 0:
|
||||
|
||||
@@ -322,6 +322,12 @@ class CudaPlatformBase(Platform):
|
||||
parallel_config = vllm_config.parallel_config
|
||||
model_config = vllm_config.model_config
|
||||
|
||||
if (
|
||||
parallel_config.prefill_context_parallel_size > 1
|
||||
and parallel_config.data_parallel_size > 1
|
||||
):
|
||||
raise ValueError("PCP does not support data parallelism on CUDA yet.")
|
||||
|
||||
if parallel_config.worker_cls == "auto":
|
||||
parallel_config.worker_cls = "vllm.v1.worker.gpu_worker.Worker"
|
||||
|
||||
|
||||
@@ -900,6 +900,12 @@ class RocmPlatform(Platform):
|
||||
compilation_config = vllm_config.compilation_config
|
||||
parallel_config = vllm_config.parallel_config
|
||||
|
||||
if (
|
||||
parallel_config.prefill_context_parallel_size > 1
|
||||
and parallel_config.data_parallel_size > 1
|
||||
):
|
||||
raise ValueError("PCP does not support data parallelism on ROCm yet.")
|
||||
|
||||
if (
|
||||
compilation_config.cudagraph_mode.has_full_cudagraphs()
|
||||
and parallel_config.prefill_context_parallel_size > 1
|
||||
|
||||
Reference in New Issue
Block a user