From 4069a3b01be1627225ae7ad2a52820bd84c95347 Mon Sep 17 00:00:00 2001 From: Won-Kyu Park Date: Sat, 3 Feb 2024 15:52:55 +0900 Subject: [PATCH] add dylib for osx --- bitsandbytes/cuda_setup/main.py | 2 +- setup.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bitsandbytes/cuda_setup/main.py b/bitsandbytes/cuda_setup/main.py index a8792c1ad..b849ce36a 100644 --- a/bitsandbytes/cuda_setup/main.py +++ b/bitsandbytes/cuda_setup/main.py @@ -37,7 +37,7 @@ # we have libcudart.so.11.0 which causes a lot of errors before # not sure if libcudart.so.12.0 exists in pytorch installs, but it does not hurt CUDA_RUNTIME_LIBS = ["libcudart.so", "libcudart.so.11.0", "libcudart.so.12.0", "libcudart.so.12.1", "libcudart.so.12.2"] - DYNAMIC_LIBRARY_SUFFIX = ".so" + DYNAMIC_LIBRARY_SUFFIX = { "Darwin": ".dylib", "Windows":".dll" }.get(platform.system(), ".so") class CUDASetup: diff --git a/setup.py b/setup.py index c493b8b62..37fdf5958 100644 --- a/setup.py +++ b/setup.py @@ -9,6 +9,7 @@ libs = list(glob.glob("./bitsandbytes/libbitsandbytes*.so")) libs += list(glob.glob("./bitsandbytes/libbitsandbytes*.dll")) +libs += list(glob.glob("./bitsandbytes/libbitsandbytes*.dylib")) libs = [os.path.basename(p) for p in libs] print("libs:", libs)