From 4a36681f854889f2d5279e189cc4dd0c8e6c85d8 Mon Sep 17 00:00:00 2001 From: Xiaozhu Meng Date: Fri, 7 Nov 2025 22:25:21 -0800 Subject: [PATCH] [flashinfer][fix] do not check nvcc availability when using pre-downloaded cubins (#27990) Signed-off-by: Xiaozhu Co-authored-by: Lu Fang <30275821+houseroad@users.noreply.github.com> --- vllm/utils/flashinfer.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vllm/utils/flashinfer.py b/vllm/utils/flashinfer.py index 0560fa15151ca..5101020fda12f 100644 --- a/vllm/utils/flashinfer.py +++ b/vllm/utils/flashinfer.py @@ -43,9 +43,13 @@ def has_flashinfer() -> bool: if importlib.util.find_spec("flashinfer") is None: logger.debug_once("FlashInfer unavailable since package was not found") return False + # When not using flashinfer cubin, # Also check if nvcc is available since it's required to JIT compile flashinfer - if shutil.which("nvcc") is None: - logger.debug_once("FlashInfer unavailable since nvcc was not found") + if not envs.VLLM_HAS_FLASHINFER_CUBIN and shutil.which("nvcc") is None: + logger.debug_once( + "FlashInfer unavailable since nvcc was not found " + "and not using pre-downloaded cubins" + ) return False return True