[ROCm] Remove stale SDPA and skinny GEMM workarounds (#50907)

Signed-off-by: Andreas Karatzas <Andreas.Karatzas@amd.com>
Signed-off-by: Andreas Karatzas <akaratza@amd.com>
Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Andreas Karatzas
2026-08-11 14:19:16 -04:00
committed by GitHub
co-authored by OpenAI Codex
parent 4f2f31b82e
commit 1ab2801dde
56 changed files with 500 additions and 558 deletions
@@ -249,10 +249,7 @@ VLM_TEST_SETTINGS = {
vllm_runner_kwargs={
"model_impl": "transformers",
},
marks=[
pytest.mark.core_model,
*([large_gpu_mark(min_gb=80)] if current_platform.is_rocm() else []),
],
marks=[pytest.mark.core_model],
),
"idefics3-transformers": VLMTestInfo(
models=["HuggingFaceTB/SmolVLM-256M-Instruct"],
@@ -282,19 +279,8 @@ VLM_TEST_SETTINGS = {
image_size_factors=[(0.25, 0.2, 0.15)],
vllm_runner_kwargs={
"model_impl": "transformers",
# TODO: [ROCm] Revert this once issue #30167 is resolved
**(
{
"mm_processor_kwargs": {
"min_pixels": 256 * 28 * 28,
"max_pixels": 1280 * 28 * 28,
},
}
if current_platform.is_rocm()
else {}
),
},
marks=[large_gpu_mark(min_gb=80 if current_platform.is_rocm() else 32)],
marks=[large_gpu_mark(min_gb=32)],
),
#### Extended model tests
"aria": VLMTestInfo(
@@ -129,7 +129,6 @@ def check_model_available(model: str) -> None:
@pytest.mark.parametrize("max_tokens", [64])
@pytest.mark.parametrize("beam_width", [1, 2])
def test_beam_search_encoder_decoder(
monkeypatch,
hf_runner,
vllm_runner,
dtype: str,
@@ -138,9 +137,6 @@ def test_beam_search_encoder_decoder(
resampled_assets,
) -> None:
"""Test beam search with encoder-decoder models (Whisper)."""
if current_platform.is_rocm():
monkeypatch.setenv("VLLM_ROCM_USE_SKINNY_GEMM", "0")
model = "openai/whisper-large-v3-turbo"
check_model_available(model)
@@ -5,9 +5,7 @@ for manipulating the input / output of HF & vLLM test runners, which are
typically specific to a small subset of models.
"""
import logging
import types
import warnings
from pathlib import PosixPath
import numpy as np
@@ -34,8 +32,6 @@ from vllm.utils.collection_utils import is_list_of
from .....conftest import HfRunner, ImageAsset, ImageTestAssets
from .types import RunnerOutput
logger = logging.getLogger(__name__)
####### vLLM output processors functions
def blip2_vllm_to_hf_output(vllm_output: RunnerOutput, model: str) -> RunnerOutput:
@@ -559,32 +555,6 @@ def isaac_patch_hf_runner(hf_model: HfRunner) -> HfRunner:
# ----------------------------
isaac_model = hf_model.model.model
# [ROCm] Disable Flash/MemEfficient SDP on ROCm to avoid HF Transformers
# accuracy issues: https://github.com/vllm-project/vllm/issues/30167
# TODO: Remove once ROCm SDP accuracy issues are resolved on HuggingFace
# ----------------------------
from ...conftest import patch_hf_vision_attn_for_rocm
try:
patch_hf_vision_attn_for_rocm(hf_model.model)
except AttributeError as e:
if "vision_config" in str(e):
warnings.warn(
f"Skipping ROCm vision attention patch for Isaac model: {e}. "
"This is expected for models without vision_config in "
"attention layers (e.g., Siglip2VariableLengthAttention).",
stacklevel=2,
)
else:
logger.error(
"Unexpected AttributeError during ROCm vision attention patch: %s. "
"Model type: %s. Inner model type: %s.",
e,
type(hf_model.model).__name__,
type(getattr(hf_model.model, "model", None)).__name__,
)
raise
def patched_forward(
self,
input_ids=None,