Skip to content

Commit 7b6cfe1

Browse files
committed
Added H100 support for CUDA 11.8 precompiled binaries.
1 parent 817bdf6 commit 7b6cfe1

File tree

3 files changed

+85
-69
lines changed

3 files changed

+85
-69
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,3 +258,9 @@ Bug fixes:
258258

259259
Deprecated:
260260
- Binaries for CUDA 11.2, 11.6 no longer ship with `pip install bitsandbytes` and need to be compiled from source.
261+
262+
263+
### 0.40.1
264+
265+
Features:
266+
- Added precompiled CUDA 11.8 binaries to support H100 GPUs without compilation #571

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ cuda11x_nomatmul: $(BUILD_DIR) env
8080
$(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA11x) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o
8181
$(GPP) -std=c++14 -DBUILD_CUDA -shared -fPIC $(INCLUDE) $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o $(BUILD_DIR)/link.o $(FILES_CPP) -o ./bitsandbytes/libbitsandbytes_cuda$(CUDA_VERSION)_nocublaslt.so $(LIB)
8282

83+
cuda118_nomatmul: $(BUILD_DIR) env
84+
$(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA11x) $(CC_ADA_HOPPER) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR) -D NO_CUBLASLT
85+
$(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA11x) $(CC_ADA_HOPPER) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o
86+
$(GPP) -std=c++14 -DBUILD_CUDA -shared -fPIC $(INCLUDE) $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o $(BUILD_DIR)/link.o $(FILES_CPP) -o ./bitsandbytes/libbitsandbytes_cuda$(CUDA_VERSION)_nocublaslt.so $(LIB)
87+
8388
cuda12x_nomatmul: $(BUILD_DIR) env
8489
$(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA11x) $(CC_ADA_HOPPER) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR) -D NO_CUBLASLT
8590
$(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA11x) $(CC_ADA_HOPPER) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o
@@ -95,6 +100,11 @@ cuda11x: $(BUILD_DIR) env
95100
$(NVCC) $(CC_cublasLt111) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o
96101
$(GPP) -std=c++14 -DBUILD_CUDA -shared -fPIC $(INCLUDE) $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o $(BUILD_DIR)/link.o $(FILES_CPP) -o ./bitsandbytes/libbitsandbytes_cuda$(CUDA_VERSION).so $(LIB)
97102

103+
cuda118: $(BUILD_DIR) env
104+
$(NVCC) $(CC_cublasLt111) $(CC_ADA_HOPPER) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR)
105+
$(NVCC) $(CC_cublasLt111) $(CC_ADA_HOPPER) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o
106+
$(GPP) -std=c++14 -DBUILD_CUDA -shared -fPIC $(INCLUDE) $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o $(BUILD_DIR)/link.o $(FILES_CPP) -o ./bitsandbytes/libbitsandbytes_cuda$(CUDA_VERSION).so $(LIB)
107+
98108
cuda12x: $(BUILD_DIR) env
99109
$(NVCC) $(CC_cublasLt111) $(CC_ADA_HOPPER) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR)
100110
$(NVCC) $(CC_cublasLt111) $(CC_ADA_HOPPER) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o

deploy.sh

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -10,77 +10,77 @@ if [[ ! -z "${LD_LIBRARY_PATH}" ]]; then
1010
fi
1111

1212

13-
#module unload cuda && echo "no module function available. Probably not on a slurm cluster."
14-
#module unload gcc && echo "no module function available. Probably not on a slurm cluster."
15-
#
16-
#rm -rf dist build
17-
#make cleaneggs
18-
#make cleanlibs
19-
#
20-
#make clean
21-
#export CUDA_HOME=
22-
#export CUDA_VERSION=
23-
#make cpuonly CUDA_VERSION="CPU"
24-
#
25-
#if [ ! -f "./bitsandbytes/libbitsandbytes_cpu.so" ]; then
26-
# # Control will enter here if $DIRECTORY doesn't exist.
27-
# echo "Compilation unsuccessul!" 1>&2
28-
# exit 64
29-
#fi
30-
#
31-
#make clean
32-
#export CUDA_HOME=$BASE_PATH/cuda-11.0
33-
#make cuda110 CUDA_VERSION=110
34-
#
35-
#if [ ! -f "./bitsandbytes/libbitsandbytes_cuda110.so" ]; then
36-
# # Control will enter here if $DIRECTORY doesn't exist.
37-
# echo "Compilation unsuccessul!" 1>&2
38-
# exit 64
39-
#fi
40-
#
41-
#make clean
42-
#export CUDA_HOME=$BASE_PATH/cuda-11.1
43-
#make cuda11x CUDA_VERSION=111
44-
#
45-
#if [ ! -f "./bitsandbytes/libbitsandbytes_cuda111.so" ]; then
46-
# # Control will enter here if $DIRECTORY doesn't exist.
47-
# echo "Compilation unsuccessul!" 1>&2
48-
# exit 64
49-
#fi
50-
#
51-
#make clean
52-
#export CUDA_HOME=$BASE_PATH/cuda-11.4
53-
#make cuda11x CUDA_VERSION=114
54-
#
55-
#if [ ! -f "./bitsandbytes/libbitsandbytes_cuda114.so" ]; then
56-
# # Control will enter here if $DIRECTORY doesn't exist.
57-
# echo "Compilation unsuccessul!" 1>&2
58-
# exit 64
59-
#fi
60-
#
61-
#make clean
62-
#export CUDA_HOME=$BASE_PATH/cuda-11.5
63-
#make cuda11x CUDA_VERSION=115
64-
#
65-
#if [ ! -f "./bitsandbytes/libbitsandbytes_cuda115.so" ]; then
66-
# # Control will enter here if $DIRECTORY doesn't exist.
67-
# echo "Compilation unsuccessul!" 1>&2
68-
# exit 64
69-
#fi
70-
#
71-
#make clean
72-
#export CUDA_HOME=$BASE_PATH/cuda-11.7
73-
#make cuda11x CUDA_VERSION=117
74-
#
75-
#if [ ! -f "./bitsandbytes/libbitsandbytes_cuda117.so" ]; then
76-
# # Control will enter here if $DIRECTORY doesn't exist.
77-
# echo "Compilation unsuccessul!" 1>&2
78-
# exit 64
79-
#fi
13+
module unload cuda && echo "no module function available. Probably not on a slurm cluster."
14+
module unload gcc && echo "no module function available. Probably not on a slurm cluster."
15+
16+
rm -rf dist build
17+
make cleaneggs
18+
make cleanlibs
19+
20+
make clean
21+
export CUDA_HOME=
22+
export CUDA_VERSION=
23+
make cpuonly CUDA_VERSION="CPU"
24+
25+
if [ ! -f "./bitsandbytes/libbitsandbytes_cpu.so" ]; then
26+
# Control will enter here if $DIRECTORY doesn't exist.
27+
echo "Compilation unsuccessul!" 1>&2
28+
exit 64
29+
fi
30+
31+
make clean
32+
export CUDA_HOME=$BASE_PATH/cuda-11.0
33+
make cuda110 CUDA_VERSION=110
34+
35+
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda110.so" ]; then
36+
# Control will enter here if $DIRECTORY doesn't exist.
37+
echo "Compilation unsuccessul!" 1>&2
38+
exit 64
39+
fi
40+
41+
make clean
42+
export CUDA_HOME=$BASE_PATH/cuda-11.1
43+
make cuda11x CUDA_VERSION=111
44+
45+
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda111.so" ]; then
46+
# Control will enter here if $DIRECTORY doesn't exist.
47+
echo "Compilation unsuccessul!" 1>&2
48+
exit 64
49+
fi
50+
51+
make clean
52+
export CUDA_HOME=$BASE_PATH/cuda-11.4
53+
make cuda11x CUDA_VERSION=114
54+
55+
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda114.so" ]; then
56+
# Control will enter here if $DIRECTORY doesn't exist.
57+
echo "Compilation unsuccessul!" 1>&2
58+
exit 64
59+
fi
60+
61+
make clean
62+
export CUDA_HOME=$BASE_PATH/cuda-11.5
63+
make cuda11x CUDA_VERSION=115
64+
65+
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda115.so" ]; then
66+
# Control will enter here if $DIRECTORY doesn't exist.
67+
echo "Compilation unsuccessul!" 1>&2
68+
exit 64
69+
fi
70+
71+
make clean
72+
export CUDA_HOME=$BASE_PATH/cuda-11.7
73+
make cuda11x CUDA_VERSION=117
74+
75+
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda117.so" ]; then
76+
# Control will enter here if $DIRECTORY doesn't exist.
77+
echo "Compilation unsuccessul!" 1>&2
78+
exit 64
79+
fi
8080

8181
make clean
8282
export CUDA_HOME=$BASE_PATH/cuda-11.8
83-
make cuda12x CUDA_VERSION=118
83+
make cuda118 CUDA_VERSION=118
8484

8585
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda118.so" ]; then
8686
# Control will enter here if $DIRECTORY doesn't exist.
@@ -172,7 +172,7 @@ fi
172172

173173
make clean
174174
export CUDA_HOME=$BASE_PATH/cuda-11.8
175-
make cuda12x_nomatmul CUDA_VERSION=118
175+
make cuda118_nomatmul CUDA_VERSION=118
176176

177177
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda118_nocublaslt.so" ]; then
178178
# Control will enter here if $DIRECTORY doesn't exist.

0 commit comments

Comments
 (0)