[Bugfix][Quantization] Guard the MXFP8 FlashInfer path on FlashInfer availability (#52648)

Signed-off-by: Han Li <han.li124@imperial.ac.uk>
Signed-off-by: Misha Goin <mgoin64@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Misha Goin <mgoin64@gmail.com>
This commit is contained in:
Han
2026-08-17 18:38:42 -07:00
committed by GitHub
co-authored by Claude Opus 5 Misha Goin
parent cdb8545a91
commit 69d3335066
2 changed files with 10 additions and 5 deletions
@@ -177,8 +177,9 @@ def _mxfp8_e4m3_quantize_impl(
alignment: int = 0,
) -> tuple[torch.Tensor, torch.Tensor]:
from vllm.platforms import current_platform
from vllm.utils.flashinfer import has_flashinfer
if current_platform.has_device_capability(100):
if current_platform.has_device_capability(100) and has_flashinfer():
from flashinfer import mxfp8_quantize as flashinfer_mxfp8_quantize
x_q, x_scales = flashinfer_mxfp8_quantize(