rebase: adapt to vLLM 0.29 callback, embedding and video decoder changes

Four unrelated 0.29 surface changes, each reproduced locally against the
pinned f5c3cc24 build:

- PromptUpdateDetails.is_embed now takes only the full token list. The
  Bagel img2img replacement still declared (tok, seq), which crashed
  stage-0 engine core startup and produced the Distributed and Qwen3-Omni
  "no live replica" failures rather than anything KV related.

- dispatch_unquantized_gemm gained a linear_backend argument and is called
  with it. The CPU-forcing test stubs took no arguments; they now accept
  and ignore whatever upstream passes so a further signature change does
  not break them again.

- VocabParallelEmbedding gained a fused kernel that engages whenever
  tp_size > 1 on CUDA, and it has no CPU implementation. The encoder TP
  fixtures drive CPU tensors under a faked TP group, so they pin the
  portable masked path.

- The pyav video decoder backend was removed; valid options are now
  opencv, torchcodec, pynvvideocodec and deepstream. The OpenAI video
  endpoint hardcoded pyav, which turned every video request into a 400.
  It moves to opencv, the upstream default.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0146Xu5Sgj4vXxLxvLjV5YPj
Signed-off-by: tzhouam <tzhouam@connect.ust.hk>
This commit is contained in:
tzhouamandClaude Opus 5 committed 2026-09-10 00:41:53 +08:00
1 parent c306445ff2
commit 08884c4cfb
10 files changed
+26 -9

No files matched your search

+1 -1
View File
@@ -46,7 +46,7 @@ def _force_default_gemm(monkeypatch):
monkeypatch.setattr(
"vllm.model_executor.layers.linear.dispatch_unquantized_gemm",
lambda: default_unquantized_gemm,
lambda *_args, **_kwargs: default_unquantized_gemm,
)
@@ -59,7 +59,7 @@ def _force_default_gemm(monkeypatch):
monkeypatch.setattr(
"vllm.model_executor.layers.linear.dispatch_unquantized_gemm",
lambda: default_unquantized_gemm,
lambda *_args, **_kwargs: default_unquantized_gemm,
)
@@ -52,7 +52,7 @@ def _force_default_gemm(monkeypatch):
monkeypatch.setattr(
"vllm.model_executor.layers.linear.dispatch_unquantized_gemm",
lambda: default_unquantized_gemm,
lambda *_args, **_kwargs: default_unquantized_gemm,
)
@@ -69,7 +69,7 @@ def _force_default_gemm(monkeypatch):
monkeypatch.setattr(
"vllm.model_executor.layers.linear.dispatch_unquantized_gemm",
lambda: default_unquantized_gemm,
lambda *_args, **_kwargs: default_unquantized_gemm,
)
@@ -64,6 +64,13 @@ def setup_tp_group(monkeypatch, mocker):
lambda: 0,
)
# vLLM 0.29 added a CUDA-only fused embedding kernel that engages whenever
# tp_size > 1; these tests drive CPU tensors, so keep the portable masked path.
monkeypatch.setattr(
"vllm.model_executor.layers.vocab_parallel_embedding.current_platform.is_cuda",
lambda: False,
)
mock_tp_group = mocker.MagicMock()
mock_tp_group.world_size = 2
mocker.patch("vllm.distributed.parallel_state.get_tp_group", return_value=mock_tp_group)
@@ -94,7 +101,7 @@ def setup_tp_group(monkeypatch, mocker):
monkeypatch.setattr(
"vllm.model_executor.layers.linear.dispatch_unquantized_gemm",
lambda: default_unquantized_gemm,
lambda *_args, **_kwargs: default_unquantized_gemm,
)
with set_current_vllm_config(VllmConfig(device_config=device_config)):
@@ -22,7 +22,7 @@ def _init_distributed(monkeypatch):
monkeypatch.setattr(
"vllm.model_executor.layers.linear.dispatch_unquantized_gemm",
lambda: default_unquantized_gemm,
lambda *_args, **_kwargs: default_unquantized_gemm,
)
os.environ.setdefault("MASTER_ADDR", "localhost")
os.environ.setdefault("MASTER_PORT", "29501")
@@ -51,7 +51,7 @@ def force_default_gemm(monkeypatch):
monkeypatch.setattr(
"vllm.model_executor.layers.linear.dispatch_unquantized_gemm",
lambda: default_unquantized_gemm,
lambda *_args, **_kwargs: default_unquantized_gemm,
)
@@ -54,6 +54,13 @@ def setup_tp_group(monkeypatch, mocker):
lambda: 0,
)
# vLLM 0.29 added a CUDA-only fused embedding kernel that engages whenever
# tp_size > 1; these tests drive CPU tensors, so keep the portable masked path.
monkeypatch.setattr(
"vllm.model_executor.layers.vocab_parallel_embedding.current_platform.is_cuda",
lambda: False,
)
# TP group
mock_tp_group = mocker.MagicMock()
mock_tp_group.world_size = 2
@@ -156,7 +156,9 @@ def _decode_video_bytes(
frames_array, metadata = loader.load_bytes(
video_bytes,
num_frames=num_frames,
backend="pyav",
# vLLM 0.29 removed the "pyav" decoder backend; "opencv" is
# upstream's default and the remaining CPU-only option.
backend="opencv",
keep=keep,
)
except Exception as exc:
@@ -433,7 +433,8 @@ class OmniBagelMultiModalProcessor(BaseMultiModalProcessor[OmniBagelProcessingIn
embed_mask = [True] * num_vae_total + [False] + [True] * num_vit_total
return PromptUpdateDetails(
full=tokens,
is_embed=lambda _tok, _seq, _m=embed_mask: torch.tensor(_m, dtype=torch.bool),
# vLLM 0.29 calls is_embed with just the full token list.
is_embed=lambda _full, _m=embed_mask: torch.tensor(_m, dtype=torch.bool),
)
replacements.append(