Skip to content

Commit 4a36681

Browse files
mxz297houseroad
andauthored
[flashinfer][fix] do not check nvcc availability when using pre-downloaded cubins (vllm-project#27990)
Signed-off-by: Xiaozhu <mxz297@gmail.com> Co-authored-by: Lu Fang <30275821+houseroad@users.noreply.github.com>
1 parent d15afc1 commit 4a36681

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

vllm/utils/flashinfer.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,13 @@ def has_flashinfer() -> bool:
4343
if importlib.util.find_spec("flashinfer") is None:
4444
logger.debug_once("FlashInfer unavailable since package was not found")
4545
return False
46+
# When not using flashinfer cubin,
4647
# Also check if nvcc is available since it's required to JIT compile flashinfer
47-
if shutil.which("nvcc") is None:
48-
logger.debug_once("FlashInfer unavailable since nvcc was not found")
48+
if not envs.VLLM_HAS_FLASHINFER_CUBIN and shutil.which("nvcc") is None:
49+
logger.debug_once(
50+
"FlashInfer unavailable since nvcc was not found "
51+
"and not using pre-downloaded cubins"
52+
)
4953
return False
5054
return True
5155

0 commit comments

Comments
 (0)