[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:
co-authored by
OpenAI Codex
parent
4f2f31b82e
commit
1ab2801dde
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user