A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 10, 04:00 UTC
[ROCm][CI] Handle missing vision_config in Isaac model attention patch (#32281)
Signed-off-by: Andreas Karatzas <akaratza@amd.com>
Andreas Karatzas committed
Jan 14, 2026 at 01:21 UTC
9d0d7f48d55ae2e1933564491cfa1f97682fde1a
1 file changed
+23
-1
tests/models/multimodal/generation/vlm_utils/model_utils.py
+23
-1
@@ -5,7 +5,9 @@ for manipulating the input / output of HF & vLLM test runners, which are
5
typically specific to a small subset of models.
6
"""
7
8
+import logging
9
import types
10
+import warnings
11
from pathlib import PosixPath
12
13
import numpy as np
@@ -31,6 +33,8 @@ from vllm.utils.collection_utils import is_list_of
33
from .....conftest import HfRunner, ImageAsset, ImageTestAssets
34
from .types import RunnerOutput
35
36
+logger = logging.getLogger(__name__)
37
+
38
39
####### vLLM output processors functions
40
def blip2_vllm_to_hf_output(vllm_output: RunnerOutput, model: str) -> RunnerOutput:
@@ -582,7 +586,25 @@ def isaac_patch_hf_runner(hf_model: HfRunner) -> HfRunner:
586
# ----------------------------
587
from ...conftest import patch_hf_vision_attn_for_rocm
588
585
- patch_hf_vision_attn_for_rocm(hf_model.model)
589
+ try:
590
+ patch_hf_vision_attn_for_rocm(hf_model.model)
591
+ except AttributeError as e:
592
+ if "vision_config" in str(e):
593
+ warnings.warn(
594
+ f"Skipping ROCm vision attention patch for Isaac model: {e}. "
595
+ "This is expected for models without vision_config in "
596
+ "attention layers (e.g., Siglip2VariableLengthAttention).",
597
+ stacklevel=2,
598
+ )
599
+ else:
600
+ logger.error(
601
+ "Unexpected AttributeError during ROCm vision attention patch: %s. "
602
+ "Model type: %s. Inner model type: %s.",
603
+ e,
604
+ type(hf_model.model).__name__,
605
+ type(getattr(hf_model.model, "model", None)).__name__,
606
+ )
607
+ raise
608
609
def patched_forward(
610
self,