From 170d498771dc39a5cb90b1eacddc1337b6bad6f9 Mon Sep 17 00:00:00 2001 From: TJian Date: Mon, 17 Aug 2026 14:46:30 +0800 Subject: [PATCH] [ROCm] [CI] Fix cpu test on rocm (#6267) Signed-off-by: tjtanaa --- vllm_omni/diffusion/models/ltx2/ltx2_phase_adapter.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vllm_omni/diffusion/models/ltx2/ltx2_phase_adapter.py b/vllm_omni/diffusion/models/ltx2/ltx2_phase_adapter.py index a205fce6b..50d413ee7 100644 --- a/vllm_omni/diffusion/models/ltx2/ltx2_phase_adapter.py +++ b/vllm_omni/diffusion/models/ltx2/ltx2_phase_adapter.py @@ -203,6 +203,11 @@ def _apply_unquantized_gemm_with_weight( weight: torch.Tensor, bias: torch.Tensor | None, ) -> torch.Tensor: + # GEMM dispatch is selected from the host platform, not the tensor device. + # In CPU tests on a ROCm host that selects rocm_unquantized_gemm, which has + # no CPU kernel. Keep that combination on PyTorch's portable implementation. + if current_platform.is_rocm() and input_.device.type == "cpu": + return F.linear(input_, weight, bias) if envs.VLLM_BATCH_INVARIANT and current_platform.is_cuda_alike(): return linear_batch_invariant(input_, weight, bias) return dispatch_unquantized_gemm()(layer, input_, weight, bias)