[Hardware][AMD][CI] Patch Whisper multi LoRA test to use TRITON_ATTN for now (#46928)

Signed-off-by: Matthew Wong <Matthew.Wong2@amd.com>
This commit is contained in:
Matt
2026-06-27 17:30:49 -05:00
committed by GitHub
parent b6caeb5a09
commit 9036c89ee4
+10 -2
View File
@@ -12,6 +12,7 @@ import pytest
import vllm
from vllm.assets.audio import AudioAsset
from vllm.lora.request import LoRARequest
from vllm.platforms import current_platform
from ..utils import create_new_process_for_each_test
@@ -30,7 +31,9 @@ def use_spawn_for_whisper(monkeypatch):
monkeypatch.setenv("VLLM_WORKER_MULTIPROC_METHOD", "spawn")
def create_whisper_llm(enable_lora: bool = True, max_loras: int = 2):
def create_whisper_llm(
enable_lora: bool = True, max_loras: int = 2, attn_backend: str | None = None
):
"""Create a Whisper LLM instance with optional LoRA support."""
return vllm.LLM(
model=WHISPER_MODEL,
@@ -40,6 +43,7 @@ def create_whisper_llm(enable_lora: bool = True, max_loras: int = 2):
max_model_len=448,
dtype="half",
enforce_eager=True, # For stability in tests
attention_config={"backend": attn_backend},
)
@@ -109,7 +113,11 @@ def test_whisper_multi_lora(whisper_lora_files):
This test verifies that the same LoRA adapter can be loaded with
different IDs and produce consistent results.
"""
llm = create_whisper_llm(enable_lora=True, max_loras=4)
llm = create_whisper_llm(
enable_lora=True,
max_loras=4,
attn_backend="TRITON_ATTN" if current_platform.is_rocm() else None,
)
# Test with different LoRA IDs using the same adapter
outputs_lora1 = run_whisper_inference(llm, lora_path=whisper_lora_files, lora_id=1)