get_cuda_lib_handle brought back so import works

This commit is contained in:
ihsanturk 2023-07-15 02:24:46 -07:00
parent 6ec4f0c374
commit 2f0f0e5dba

View File

@ -360,3 +360,13 @@ def evaluate_cuda_setup():
binary_name = f"libbitsandbytes_cuda{cuda_version_string}_nocublaslt.so" binary_name = f"libbitsandbytes_cuda{cuda_version_string}_nocublaslt.so"
return binary_name, cudart_path, cc, cuda_version_string return binary_name, cudart_path, cc, cuda_version_string
def get_cuda_lib_handle():
# 1. find libcuda.so library (GPU driver) (/usr/lib)
try:
cuda = ct.CDLL("libcuda.so")
except OSError:
CUDASetup.get_instance().add_log_entry('CUDA SETUP: WARNING! libcuda.so not found! Do you have a CUDA driver installed? If you are on a cluster, make sure you are on a CUDA machine!')
return None
return cuda