[Bugfix] Use DP index for dense DP weight updates and EC CPU region (#56950)
Signed-off-by: lxy-alexander <lxy_alexander@outlook.com> Signed-off-by: aoshen02 <aoshen02@users.noreply.github.com> Co-authored-by: aoshen02 <aoshen02@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: aoshen02 <aoshen@inferact.ai> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
aoshen02
Claude Opus 5
aoshen02
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
861a299adc
commit
9e1cd262cb
@@ -11,7 +11,7 @@ import pytest
|
||||
import torch
|
||||
import torch.nn as nn
|
||||
|
||||
from vllm.config import VllmConfig, get_current_vllm_config
|
||||
from vllm.config import ParallelConfig, VllmConfig, get_current_vllm_config
|
||||
from vllm.lora.layers import BaseLayerWithLoRA
|
||||
from vllm.v1.worker.gpu_model_runner import _get_parameter_for_reload
|
||||
from vllm.v1.worker.gpu_worker import Worker
|
||||
@@ -136,12 +136,22 @@ def test_rank_local_update_selects_worker_payload(rank, expected):
|
||||
assert worker._weight_update_active is True
|
||||
|
||||
|
||||
def test_rank_local_update_includes_data_parallel_rank():
|
||||
def test_rank_local_update_uses_data_parallel_index_after_reconfigure():
|
||||
engine = _RecordingEngine()
|
||||
worker = _make_worker(engine)
|
||||
worker.rank = 0
|
||||
worker.vllm_config.parallel_config.data_parallel_size = 4
|
||||
worker.vllm_config.parallel_config.data_parallel_rank = 2
|
||||
parallel_config = ParallelConfig(
|
||||
data_parallel_size=4,
|
||||
data_parallel_rank=2,
|
||||
)
|
||||
assert parallel_config.data_parallel_rank == 2
|
||||
assert parallel_config.data_parallel_index == 2
|
||||
|
||||
parallel_config.reconfigure_for_independent_dp_rank()
|
||||
assert parallel_config.data_parallel_rank == 0
|
||||
assert parallel_config.data_parallel_index == 2
|
||||
|
||||
worker.vllm_config.parallel_config = parallel_config
|
||||
Worker.start_weight_update(worker)
|
||||
|
||||
Worker.update_weights(
|
||||
|
||||
Reference in New Issue
Block a user