[ROCm][CI] Skip ModernBERT FP8 MTEB test when no FP8 ScaledMM kernel exists (#53589)

Signed-off-by: Djordje Ramic <djoramic@amd.com>
This commit is contained in:
djramic
2026-08-25 08:07:09 +00:00
committed by GitHub
parent 12c84b98dd
commit d9fbe526c0
2 changed files with 33 additions and 14 deletions
@@ -5,9 +5,27 @@ import pytest
from tests.models.utils import EmbedModelInfo
from tests.quantization.utils import is_quant_method_supported
from vllm.platforms import current_platform
from .mteb_embed_utils import mteb_test_embed_models
def _fp8_scaled_mm_unsupported() -> bool:
"""Whether the ModernBERT online FP8 test should be skipped.
``is_quant_method_supported("fp8")`` returns True on MI250 (gfx90a), but
serving a per-tensor FP8 linear layer on ROCm requires CDNA3+ or RDNA4,
so treat it as unsupported here.
"""
if not is_quant_method_supported("fp8"):
return True
if current_platform.is_rocm():
from vllm.platforms.rocm import get_cdna_version, on_gfx12x
return get_cdna_version() <= 2 and not on_gfx12x()
return False
MODEL_INFO = EmbedModelInfo(
"Alibaba-NLP/gte-modernbert-base",
mteb_score=0.748193353,
@@ -39,8 +57,8 @@ def _assert_modernbert_online_fp8(model) -> None:
@pytest.mark.skipif(
not is_quant_method_supported("fp8"),
reason="FP8 is not supported on this GPU type.",
_fp8_scaled_mm_unsupported(),
reason="No FP8 ScaledMM kernel is available on this GPU type.",
)
def test_modernbert_online_fp8_mteb(hf_runner, vllm_runner, monkeypatch) -> None:
monkeypatch.setenv("VLLM_ALLOW_INSECURE_SERIALIZATION", "1")