Skip to content

Commit 4069a3b

Browse files
committed
add dylib for osx
1 parent 3b3d32a commit 4069a3b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

bitsandbytes/cuda_setup/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
# we have libcudart.so.11.0 which causes a lot of errors before
3838
# not sure if libcudart.so.12.0 exists in pytorch installs, but it does not hurt
3939
CUDA_RUNTIME_LIBS = ["libcudart.so", "libcudart.so.11.0", "libcudart.so.12.0", "libcudart.so.12.1", "libcudart.so.12.2"]
40-
DYNAMIC_LIBRARY_SUFFIX = ".so"
40+
DYNAMIC_LIBRARY_SUFFIX = { "Darwin": ".dylib", "Windows":".dll" }.get(platform.system(), ".so")
4141

4242

4343
class CUDASetup:

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
libs = list(glob.glob("./bitsandbytes/libbitsandbytes*.so"))
1111
libs += list(glob.glob("./bitsandbytes/libbitsandbytes*.dll"))
12+
libs += list(glob.glob("./bitsandbytes/libbitsandbytes*.dylib"))
1213
libs = [os.path.basename(p) for p in libs]
1314
print("libs:", libs)
1415

0 commit comments

Comments
 (0)