"tests/vscode:/vscode.git/clone" did not exist on "65efb4f5a0503ab574c3f4a64f58a32078d1f340"
Unverified Commit 7d3b7c87 authored by Yineng Zhang's avatar Yineng Zhang Committed by GitHub
Browse files

fix: determine if flashinfer is installed (#5336)

parent 75015bb6
...@@ -16,6 +16,7 @@ import base64 ...@@ -16,6 +16,7 @@ import base64
import builtins import builtins
import ctypes import ctypes
import dataclasses import dataclasses
import importlib
import io import io
import ipaddress import ipaddress
import itertools import itertools
...@@ -127,7 +128,7 @@ def is_flashinfer_available(): ...@@ -127,7 +128,7 @@ def is_flashinfer_available():
""" """
if not get_bool_env_var("SGLANG_IS_FLASHINFER_AVAILABLE", default="true"): if not get_bool_env_var("SGLANG_IS_FLASHINFER_AVAILABLE", default="true"):
return False return False
return is_cuda() return importlib.util.find_spec("flashinfer") is not None and is_cuda()
def is_cuda_available(): def is_cuda_available():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment