@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / ba8d2165b6
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 14, 05:30 UTC

Handle triton kernel import exception (#25319)

Signed-off-by: Ming Yang <minos.future@gmail.com>

Ming Yang committed Sep 23, 2025 at 00:56 UTC ba8d2165b655793ff24cf074d041e0bddfc5a0cc
1 file changed +8 -3
vllm/model_executor/layers/fused_moe/config.py
+8 -3
@@ -14,11 +14,16 @@ from vllm.model_executor.layers.quantization.utils.quant_utils import (
14 from vllm.utils import cdiv, has_triton_kernels
15 from vllm.utils.flashinfer import has_flashinfer_cutlass_fused_moe
16
17 -if has_triton_kernels():
18 - from triton_kernels.matmul_ogs import PrecisionConfig
19 -
17 logger = init_logger(__name__)
18
19 +if has_triton_kernels():
20 + try:
21 + from triton_kernels.matmul_ogs import PrecisionConfig
22 + except ImportError:
23 + logger.error(
24 + "Failed to import Triton kernels. Please make sure your triton "
25 + "version is compatible.")
26 +
27
28 def _get_config_dtype_str(
29 dtype: torch.dtype,