[ROCm] triton+triton_kernels 3.8 mxfp4 MoE support (gpt-oss + DeepSeek-V4) (#55934)
Signed-off-by: Rohan Potdar <rohan.potdar@amd.com> Signed-off-by: Rohan138 <rohanpotdar138@gmail.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Matt <156021403+mawong-amd@users.noreply.github.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
Matt
parent
95f4925c3a
commit
3e267bae70
@@ -527,6 +527,26 @@ def has_triton_kernels() -> bool:
|
||||
return is_available
|
||||
|
||||
|
||||
@cache
|
||||
def get_triton_kernels_version() -> str | None:
|
||||
"""The triton_kernels MoE-API generation ("3.5.1"/"3.6"/"3.8"), or None.
|
||||
|
||||
Inferred by capability since the package exposes no usable version: 3.8
|
||||
replaced ``matmul_ogs`` with ``matmul``, and 3.5.1 predates ``SparseMatrix``.
|
||||
"""
|
||||
if not has_triton_kernels():
|
||||
return None
|
||||
try:
|
||||
import triton_kernels.matmul_ogs # noqa: F401
|
||||
except ImportError:
|
||||
return "3.8"
|
||||
try:
|
||||
from triton_kernels.tensor import SparseMatrix # noqa: F401
|
||||
except ImportError:
|
||||
return "3.5.1"
|
||||
return "3.6"
|
||||
|
||||
|
||||
@cache
|
||||
def has_tilelang() -> bool:
|
||||
"""Whether the optional `tilelang` package is available.
|
||||
|
||||
Reference in New Issue
Block a user