[Feature] Triton kernel dispatcher (#43048)
Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user