[Feature] Triton kernel dispatcher (#43048)

Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
This commit is contained in:
wangxiyuan
2026-09-25 04:07:43 +00:00
committed by GitHub
parent b05f7d5fbc
commit 44257c2e35
8 changed files with 482 additions and 98 deletions
+13
View File
@@ -366,6 +366,19 @@ class Platform:
with contextlib.suppress(ImportError):
import vllm._moe_C_stable_libtorch # noqa: F401
@classmethod
def register_triton_kernel_overrides(cls) -> None:
"""Override core Triton kernels with platform implementations.
Platforms whose Triton kernels need replacement implementations
(e.g. CPU fallbacks when the Triton-CPU backend is unavailable)
override this method and call
:func:`vllm.triton_utils.dispatcher.register_kernels`
with their overrides. It runs during model runner init, before any
kernel launch. The default implementation does nothing.
"""
return
@classmethod
def get_attn_backend_cls(
cls,