[NPU][Quantization] Add RainFusion attention and INT8 online quantization for MiniMax H3 (#5706)

Signed-off-by: Zijun Huang <zijunhua@usc.edu>
Co-authored-by: WeiQing Chen <40507679+david6666666@users.noreply.github.com>
This commit is contained in:
Zijun HuangandWeiQing Chen authored and GitHub committed 2026-08-06 14:15:21 +08:00
1 parent bc95e7415f
commit 93457f29ff
22 files changed
+1055 -8

No files matched your search

+23
View File
@@ -127,6 +127,29 @@ class OmniPlatform(Platform):
"""
raise NotImplementedError
@classmethod
def validate_diffusion_attn_backend(cls, selected_backend: str) -> None:
"""Reject an explicitly selected backend this platform cannot run.
Platforms call this from ``get_diffusion_attn_backend_cls`` so that a
backend restricted to other hardware, or one whose kernel package is
missing, fails during resolution rather than at the first forward.
"""
from vllm_omni.diffusion.attention.backends.registry import DiffusionAttentionBackendEnum
backend_upper = selected_backend.upper()
backend_cls = DiffusionAttentionBackendEnum[backend_upper].get_class()
supported = backend_cls.supported_platforms
platform = cls._omni_enum.value
if supported is not None and platform not in supported:
raise ValueError(
f"The {backend_upper} diffusion attention backend runs on {', '.join(supported)} only, "
f"but the current platform is {platform}. Select a backend supported here, "
"such as FLASH_ATTN or TORCH_SDPA."
)
backend_cls.validate_available()
@classmethod
def supports_torch_inductor(cls) -> bool:
"""Check if the platform supports torch.compile with inductor backend."""