[ROCm][CI] Enable HY-V4 model initialization on ROCm (#54405)
Signed-off-by: Andreas Karatzas <Andreas.Karatzas@amd.com>
Andreas Karatzas committed
Sep 7, 2026 at 20:55 UTC
6b5a12c0f843f10aec5fd5e439a1b8091dd66b8c
2 files changed
+6
-7
tests/models/test_registry.py
+2
-2
@@ -60,9 +60,9 @@ def test_registry_imports(model_arch):
60
pytest.skip("Dots3 NOTE is only supported on CUDA")
61
62
if model_arch in ("HYV4ForCausalLM", "HYV4MTPModel") and not (
63
- current_platform.is_cuda()
63
+ current_platform.is_cuda() or current_platform.is_rocm()
64
):
65
- pytest.skip("HY V4 is only supported on CUDA")
65
+ pytest.skip("HY V4 is only supported on CUDA and ROCm")
66
67
if model_arch == "DeepseekV4ForConditionalGeneration" and not (
68
current_platform.is_cuda()
vllm/models/hy_v4/__init__.py
+4
-5
@@ -14,19 +14,18 @@ The package is organized like `vllm.models.deepseek_v32`: this module is the
14
only public entry point and dispatches on the current platform, so registry
15
entries never reach into a platform subpackage.
16
17
-Only NVIDIA is supported for now. The port also drops the reference
17
+NVIDIA and ROCm are supported. The port also drops the reference
18
implementation's HPC/TPCP fusion paths, which depend on infrastructure that
19
does not exist in this tree.
20
"""
21
22
from vllm.platforms import current_platform
23
24
-if current_platform.is_rocm():
25
- raise NotImplementedError("hy_v4 does not yet support ROCm.")
26
-elif current_platform.is_xpu():
24
+if current_platform.is_xpu():
25
raise NotImplementedError("hy_v4 does not yet support XPU.")
26
else:
29
- # Covers Blackwell (sm100) and all other CUDA devices.
27
+ # The implementation is shared by CUDA and ROCm; platform-specific
28
+ # attention behavior is selected by the normal attention backend router.
29
from .nvidia.model import HYV4ForCausalLM
30
from .nvidia.mtp import HYV4MTP
31