fix: determine if flashinfer is installed (#5336)
This commit is contained in:
@@ -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():
|
|||||||
"""
|
"""
|
||||||
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():
|
||||||
|
|||||||
Reference in New Issue
Block a user