[CI] Fix various failures on `main` (#47197)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Harry Mellor committed
Jul 1, 2026 at 10:35 UTC
e7d0fcbc0954382f10fb4c9cee1df6f3a16113e8
5 files changed
+18
-14
tests/distributed/test_weight_transfer.py
+8
-13
@@ -37,23 +37,18 @@ from vllm.platforms import current_platform
37
from vllm.utils.network_utils import get_open_port
38
39
40
-def _weight_transfer_ray_env_vars() -> dict[str, str]:
41
- if not current_platform.is_rocm():
42
- return {}
43
-
44
- return {
45
- "RAY_EXPERIMENTAL_NOSET_CUDA_VISIBLE_DEVICES": "1",
46
- "RAY_EXPERIMENTAL_NOSET_HIP_VISIBLE_DEVICES": "1",
47
- "RAY_EXPERIMENTAL_NOSET_ROCR_VISIBLE_DEVICES": "1",
48
- }
49
-
50
-
40
def _init_ray_for_weight_transfer() -> None:
41
if ray.is_initialized():
42
return
43
ray.init(
44
ignore_reinit_error=True,
56
- runtime_env={"env_vars": _weight_transfer_ray_env_vars()},
45
+ runtime_env={
46
+ "env_vars": {
47
+ "RAY_EXPERIMENTAL_NOSET_CUDA_VISIBLE_DEVICES": "1",
48
+ "RAY_EXPERIMENTAL_NOSET_HIP_VISIBLE_DEVICES": "1",
49
+ "RAY_EXPERIMENTAL_NOSET_ROCR_VISIBLE_DEVICES": "1",
50
+ }
51
+ },
52
)
53
54
@@ -66,7 +61,7 @@ def _get_ray_assigned_device() -> torch.device:
61
62
def _set_ray_assigned_device() -> torch.device:
63
device = _get_ray_assigned_device()
69
- torch.accelerator.set_device_index(device)
64
+ current_platform.set_device(device)
65
return device
66
67
tests/v1/e2e/general/test_mamba_prefix_cache.py
+2
@@ -403,6 +403,7 @@ def _run_ref_mamba_state_worker():
403
GPUModelRunner._sample = fake_sample_fn
404
engine = LLM(
405
model=MODEL,
406
+ load_format="dummy",
407
block_size=BLOCK_SIZE,
408
hf_overrides={"num_hidden_layers": NUM_HIDDEN_LAYERS},
409
seed=42,
@@ -750,6 +751,7 @@ def test_mamba_prefix_cache_mrv1(monkeypatch: pytest.MonkeyPatch):
751
752
engine = LLM(
753
model=MODEL,
754
+ load_format="dummy",
755
enable_prefix_caching=True,
756
block_size=BLOCK_SIZE,
757
mamba_cache_mode="align",
vllm/model_executor/layers/fused_moe/routed_experts.py
+1
-1
@@ -907,7 +907,7 @@ class RoutedExperts(PluggableLayer):
907
# Unified loading logic for fused and non-fused experts
908
loaded_experts = experts_shard.unbind()
909
for expert_id, loaded_expert in enumerate(loaded_experts, start=start):
910
- success = self.weight_loader(
910
+ success = param.weight_loader(
911
param=param,
912
loaded_weight=loaded_expert,
913
weight_name=weight_name,
vllm/model_executor/models/deepseek_v2.py
+4
@@ -1445,6 +1445,8 @@ class DeepseekV2Model(nn.Module):
1445
hidden_states, residual = combined_states.split(
1446
[self.hidden_size, self.hidden_size], dim=-1
1447
)
1448
+ # fused_add_rms_norm requires a contiguous residual
1449
+ residual = residual.contiguous()
1450
if idx in self.aux_hidden_state_layers:
1451
aux_hidden_state = hidden_states + residual
1452
if aux_hidden_state.shape[0] != positions.shape[0]:
@@ -1469,6 +1471,8 @@ class DeepseekV2Model(nn.Module):
1471
hidden_states, residual = combined_states.split(
1472
[self.hidden_size, self.hidden_size], dim=-1
1473
)
1474
+ # fused_add_rms_norm requires a contiguous residual
1475
+ residual = residual.contiguous()
1476
1477
if self.end_layer in self.aux_hidden_state_layers:
1478
aux_hidden_states.append(hidden_states + residual)
vllm/model_executor/models/gemma3_mm.py
+3
@@ -761,6 +761,7 @@ class Gemma3ForConditionalGeneration(
761
max_frames_per_batch: int,
762
device: torch.device,
763
dtype: torch.dtype,
764
+ path: str = "default",
765
):
766
from vllm.v1.worker.encoder_cudagraph_defs import (
767
EncoderCudaGraphCaptureInputs,
@@ -792,6 +793,7 @@ class Gemma3ForConditionalGeneration(
793
mm_kwargs: dict[str, Any],
794
max_batch_size: int,
795
max_frames_per_batch: int,
796
+ path: str = "default",
797
):
798
from vllm.v1.worker.encoder_cudagraph_defs import (
799
EncoderCudaGraphReplayBuffers,
@@ -804,6 +806,7 @@ class Gemma3ForConditionalGeneration(
806
def encoder_cudagraph_forward(
807
self,
808
values: dict[str, torch.Tensor],
809
+ path: str = "default",
810
) -> torch.Tensor:
811
pixel_values = values["pixel_values"]
812
image_features = self.vision_tower(pixel_values)