[flashinfer][fix] do not check nvcc availability when using pre-downloaded cubins (#27990)

Signed-off-by: Xiaozhu <mxz297@gmail.com>
Co-authored-by: Lu Fang <30275821+houseroad@users.noreply.github.com>
This commit is contained in:
Xiaozhu Meng 2025-11-07 22:25:21 -08:00 committed by GitHub
parent d15afc1fd0
commit 4a36681f85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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