[CI][NPU] Bugfix import sgl-kernel error (#18173)

This commit is contained in:
Even Zhou
2026-02-04 03:39:38 +08:00
committed by GitHub
parent 495290aefd
commit d48bbe3bed

View File

@@ -22,6 +22,7 @@ from sglang.srt.layers.quantization.fp8_kernel import (
scaled_fp8_quant,
)
from sglang.srt.utils.common import (
is_cuda_alike,
is_flashinfer_available,
is_sm120_supported,
next_power_of_2,
@@ -32,10 +33,13 @@ if TYPE_CHECKING:
StandardCombineInput,
StandardDispatchOutput,
)
if is_flashinfer_available() and is_sm120_supported():
from flashinfer import fp4_quantize
else:
elif is_cuda_alike():
from sgl_kernel import scaled_fp4_quant as fp4_quantize
else:
fp4_quantize = None
def align_fp8_moe_weights_for_flashinfer_trtllm(