Initial build script changes (untested on PyPi).

This commit is contained in:
Tim Dettmers 2022-07-31 19:41:56 -07:00
parent dd50382b32
commit 28d1e7dc01
4 changed files with 212 additions and 247 deletions

View File

@ -1,10 +1,16 @@
MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
ROOT_DIR := $(patsubst %/,%,$(dir $(MKFILE_PATH))) ROOT_DIR := $(patsubst %/,%,$(dir $(MKFILE_PATH)))
ifndef CUDA_VERSION
$(error ERROR: CUDA_VERSION not set. Call make with CUDA string, for example: make cuda11x CUDA_VERSION=115 or make cpuonly CUDA_VERSION=CPU)
endif
GPP:= /usr/bin/g++ GPP:= /usr/bin/g++
ifeq ($(CUDA_HOME),) ifeq ($(CUDA_HOME),)
CUDA_HOME:= $(shell which nvcc | rev | cut -d'/' -f3- | rev) CUDA_HOME:= $(shell which nvcc | rev | cut -d'/' -f3- | rev)
endif endif
NVCC := $(CUDA_HOME)/bin/nvcc NVCC := $(CUDA_HOME)/bin/nvcc
########################################### ###########################################
@ -53,44 +59,46 @@ CC_cublasLt111 += -gencode arch=compute_86,code=sm_86
all: $(ROOT_DIR)/dependencies/cub $(BUILD_DIR) env all: $(ROOT_DIR)/dependencies/cub $(BUILD_DIR) env
$(NVCC) $(COMPUTE_CAPABILITY) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR) $(NVCC) $(COMPUTE_CAPABILITY) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR)
$(NVCC) $(COMPUTE_CAPABILITY) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o $(NVCC) $(COMPUTE_CAPABILITY) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o
$(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.so $(LIB) $(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)
cuda92: $(ROOT_DIR)/dependencies/cub $(BUILD_DIR) env cuda92: $(ROOT_DIR)/dependencies/cub $(BUILD_DIR) env
$(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA92) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR) -D NO_CUBLASLT $(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA92) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR) -D NO_CUBLASLT
$(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA92) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o $(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA92) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o
$(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.so $(LIB) $(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)
cuda10x_nomatmul: $(ROOT_DIR)/dependencies/cub $(BUILD_DIR) env cuda10x_nomatmul: $(ROOT_DIR)/dependencies/cub $(BUILD_DIR) env
$(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA10x) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR) -D NO_CUBLASLT $(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA10x) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR) -D NO_CUBLASLT
$(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA10x) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o $(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA10x) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o
$(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.so $(LIB) $(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)
cuda110_nomatmul: $(BUILD_DIR) env cuda110_nomatmul: $(BUILD_DIR) env
$(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA110) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR) -D NO_CUBLASLT $(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA110) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR) -D NO_CUBLASLT
$(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA110) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o $(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA110) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o
$(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.so $(LIB) $(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)
cuda11x_nomatmul: $(BUILD_DIR) env cuda11x_nomatmul: $(BUILD_DIR) env
$(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA11x) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR) -D NO_CUBLASLT $(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA11x) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR) -D NO_CUBLASLT
$(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA11x) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o $(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA11x) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o
$(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.so $(LIB) $(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)
cuda110: $(BUILD_DIR) env cuda110: $(BUILD_DIR) env
$(NVCC) $(CC_cublasLt110) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR) $(NVCC) $(CC_cublasLt110) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR)
$(NVCC) $(CC_cublasLt110) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o $(NVCC) $(CC_cublasLt110) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o
$(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.so $(LIB) $(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)
cuda11x: $(BUILD_DIR) env cuda11x: $(BUILD_DIR) env
$(NVCC) $(CC_cublasLt111) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR) $(NVCC) $(CC_cublasLt111) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR)
$(NVCC) $(CC_cublasLt111) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o $(NVCC) $(CC_cublasLt111) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o
$(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.so $(LIB) $(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)
cpuonly: $(BUILD_DIR) env cpuonly: $(BUILD_DIR) env
$(GPP) -std=c++14 -shared -fPIC -I $(ROOT_DIR)/csrc -I $(ROOT_DIR)/include $(FILES_CPP) -o ./bitsandbytes/libbitsandbytes.so $(GPP) -std=c++14 -shared -fPIC -I $(ROOT_DIR)/csrc -I $(ROOT_DIR)/include $(FILES_CPP) -o ./bitsandbytes/libbitsandbytes_$(CUDA_VERSION).so
env: env:
@echo "ENVIRONMENT" @echo "ENVIRONMENT"
@echo "============================" @echo "============================"
@echo "CUDA_VERSION: $(CUDA_VERSION)"
@echo "============================"
@echo "NVCC path: $(NVCC)" @echo "NVCC path: $(NVCC)"
@echo "GPP path: $(GPP) VERSION: `$(GPP) --version | head -n 1`" @echo "GPP path: $(GPP) VERSION: `$(GPP) --version | head -n 1`"
@echo "CUDA_HOME: $(CUDA_HOME)" @echo "CUDA_HOME: $(CUDA_HOME)"
@ -108,7 +116,7 @@ $(ROOT_DIR)/dependencies/cub:
cd dependencies/cub; git checkout 1.11.0 cd dependencies/cub; git checkout 1.11.0
clean: clean:
rm cuda_build/* ./bitsandbytes/libbitsandbytes.so rm build/* ./bitsandbytes/libbitsandbytes.so
cleaneggs: cleaneggs:
rm -rf *.egg* rm -rf *.egg*

View File

@ -133,7 +133,7 @@ def evaluate_cuda_setup():
has_gpu = cc != '' has_gpu = cc != ''
if not has_gpu: if not has_gpu:
print('WARNING: No GPU detected! Check our CUDA paths. Processding to load CPU-only library...') print('WARNING: No GPU detected! Check our CUDA paths. Processing to load CPU-only library...')
return binary_name return binary_name
has_cublaslt = cc in ['7.5', '8.0', '8.6'] has_cublaslt = cc in ['7.5', '8.0', '8.6']

View File

@ -14,256 +14,204 @@ module unload cuda
module unload gcc module unload gcc
rm -rf dist build rm -rf dist build
make clean
make cleaneggs make cleaneggs
make clean
export CUDA_HOME= export CUDA_HOME=
make cpuonly make cpuonly CUDA_VERSION=CPU
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
# Control will enter here if $DIRECTORY doesn't exist. # Control will enter here if $DIRECTORY doesn't exist.
echo "Compilation unsuccessul!" 1>&2 echo "Compilation unsuccessul!" 1>&2
exit 64 exit 64
fi fi
CUDA_VERSION=cpu python -m build
python -m twine upload dist/* --verbose --repository testpypi
rm -rf dist build
make clean make clean
make cleaneggs
export CUDA_HOME=$BASE_PATH/cuda-11.0 export CUDA_HOME=$BASE_PATH/cuda-11.0
make cuda110 make cuda110 CUDA_VERSION=110
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
# Control will enter here if $DIRECTORY doesn't exist. # Control will enter here if $DIRECTORY doesn't exist.
echo "Compilation unsuccessul!" 1>&2 echo "Compilation unsuccessul!" 1>&2
exit 64 exit 64
fi fi
CUDA_VERSION=110 python -m build
python -m twine upload dist/* --verbose --repository testpypi #make clean
#export CUDA_HOME=$BASE_PATH/cuda-11.1
rm -rf dist build #make cuda11x CUDA_VERSION=111
make clean #
make cleaneggs #if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
export CUDA_HOME=$BASE_PATH/cuda-11.1 # # Control will enter here if $DIRECTORY doesn't exist.
make cuda11x # echo "Compilation unsuccessul!" 1>&2
# exit 64
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then #fi
# Control will enter here if $DIRECTORY doesn't exist. #
echo "Compilation unsuccessul!" 1>&2 #make clean
exit 64 #export CUDA_HOME=$BASE_PATH/cuda-11.2
fi #make cuda11x CUDA_VERSION=112
CUDA_VERSION=111 python -m build #
python -m twine upload dist/* --verbose --repository testpypi #if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
# # Control will enter here if $DIRECTORY doesn't exist.
rm -rf dist build # echo "Compilation unsuccessul!" 1>&2
make clean # exit 64
make cleaneggs #fi
export CUDA_HOME=$BASE_PATH/cuda-11.2 #CUDA_VERSION=112 python -m build
make cuda11x #
#make clean
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then #export CUDA_HOME=$BASE_PATH/cuda-11.3
# Control will enter here if $DIRECTORY doesn't exist. #make cuda11x CUDA_VERSION=113
echo "Compilation unsuccessul!" 1>&2 #
exit 64 #if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
fi # # Control will enter here if $DIRECTORY doesn't exist.
CUDA_VERSION=112 python -m build # echo "Compilation unsuccessul!" 1>&2
python -m twine upload dist/* --verbose --repository testpypi # exit 64
#fi
rm -rf dist build #CUDA_VERSION=113 python -m build
make clean #
make cleaneggs #make clean
export CUDA_HOME=$BASE_PATH/cuda-11.3 #export CUDA_HOME=$BASE_PATH/cuda-11.4
make cuda11x #make cuda11x CUDA_VERSION=114
#
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then #if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
# Control will enter here if $DIRECTORY doesn't exist. # # Control will enter here if $DIRECTORY doesn't exist.
echo "Compilation unsuccessul!" 1>&2 # echo "Compilation unsuccessul!" 1>&2
exit 64 # exit 64
fi #fi
CUDA_VERSION=113 python -m build #CUDA_VERSION=114 python -m build
python -m twine upload dist/* --verbose --repository testpypi #
#make clean
rm -rf dist build #export CUDA_HOME=$BASE_PATH/cuda-11.5
make clean #make cuda11x CUDA_VERSION=115
make cleaneggs #
export CUDA_HOME=$BASE_PATH/cuda-11.4 #if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
make cuda11x # # Control will enter here if $DIRECTORY doesn't exist.
# echo "Compilation unsuccessul!" 1>&2
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then # exit 64
# Control will enter here if $DIRECTORY doesn't exist. #fi
echo "Compilation unsuccessul!" 1>&2 #CUDA_VERSION=115 python -m build
exit 64 #
fi #make clean
CUDA_VERSION=114 python -m build #export CUDA_HOME=$BASE_PATH/cuda-11.6
python -m twine upload dist/* --verbose --repository testpypi #
#make cuda11x CUDA_VERSION=116
rm -rf dist build #if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
make clean # # Control will enter here if $DIRECTORY doesn't exist.
make cleaneggs # echo "Compilation unsuccessul!" 1>&2
export CUDA_HOME=$BASE_PATH/cuda-11.5 # exit 64
make cuda11x #fi
#CUDA_VERSION=116 python -m build
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then #
# Control will enter here if $DIRECTORY doesn't exist. #make clean
echo "Compilation unsuccessul!" 1>&2 #export CUDA_HOME=$BASE_PATH/cuda-11.7
exit 64 #make cuda11x CUDA_VERSION=117
fi #
CUDA_VERSION=115 python -m build #if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
python -m twine upload dist/* --verbose --repository testpypi # # Control will enter here if $DIRECTORY doesn't exist.
# echo "Compilation unsuccessul!" 1>&2
rm -rf dist build # exit 64
make clean #fi
make cleaneggs #CUDA_VERSION=117 python -m build
export CUDA_HOME=$BASE_PATH/cuda-11.6 #
#
make cuda11x #make clean
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then #export CUDA_HOME=$BASE_PATH/cuda-10.2
# Control will enter here if $DIRECTORY doesn't exist. #make cuda10x_nomatmul CUDA_VERSION=102
echo "Compilation unsuccessul!" 1>&2 #
exit 64 #if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
fi # # Control will enter here if $DIRECTORY doesn't exist.
CUDA_VERSION=116 python -m build # echo "Compilation unsuccessul!" 1>&2
python -m twine upload dist/* --verbose --repository testpypi # exit 64
#fi
rm -rf dist build #CUDA_VERSION=102-nomatmul python -m build
make clean #
make cleaneggs #
export CUDA_HOME=$BASE_PATH/cuda-11.7 #make clean
make cuda11x #export CUDA_HOME=$BASE_PATH/cuda-11.0
#make cuda110_nomatmul CUDA_VERSION=110
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then #
# Control will enter here if $DIRECTORY doesn't exist. #if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
echo "Compilation unsuccessul!" 1>&2 # # Control will enter here if $DIRECTORY doesn't exist.
exit 64 # echo "Compilation unsuccessul!" 1>&2
fi # exit 64
CUDA_VERSION=117 python -m build #fi
python -m twine upload dist/* --verbose --repository testpypi #CUDA_VERSION=110-nomatmul python -m build
#
#
rm -rf dist build #make clean
make clean #export CUDA_HOME=$BASE_PATH/cuda-11.1
make cleaneggs #make cuda11x_nomatmul CUDA_VERSION=111
export CUDA_HOME=$BASE_PATH/cuda-10.2 #
make cuda10x_nomatmul #if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
# # Control will enter here if $DIRECTORY doesn't exist.
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then # echo "Compilation unsuccessul!" 1>&2
# Control will enter here if $DIRECTORY doesn't exist. # exit 64
echo "Compilation unsuccessul!" 1>&2 #fi
exit 64 #CUDA_VERSION=111-nomatmul python -m build
fi #
CUDA_VERSION=102-nomatmul python -m build #make clean
python -m twine upload dist/* --verbose --repository testpypi #export CUDA_HOME=$BASE_PATH/cuda-11.2
#make cuda11x_nomatmul CUDA_VERSION=112
#
rm -rf dist build #if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
make clean # # Control will enter here if $DIRECTORY doesn't exist.
make cleaneggs # echo "Compilation unsuccessul!" 1>&2
export CUDA_HOME=$BASE_PATH/cuda-11.0 # exit 64
make cuda110_nomatmul #fi
#CUDA_VERSION=112-nomatmul python -m build
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then #
# Control will enter here if $DIRECTORY doesn't exist. #make clean
echo "Compilation unsuccessul!" 1>&2 #export CUDA_HOME=$BASE_PATH/cuda-11.3
exit 64 #make cuda11x_nomatmul CUDA_VERSION=113
fi #
CUDA_VERSION=110-nomatmul python -m build #if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
python -m twine upload dist/* --verbose --repository testpypi # # Control will enter here if $DIRECTORY doesn't exist.
# echo "Compilation unsuccessul!" 1>&2
# exit 64
rm -rf dist build #fi
make clean #CUDA_VERSION=113-nomatmul python -m build
make cleaneggs #
export CUDA_HOME=$BASE_PATH/cuda-11.1 #make clean
make cuda11x_nomatmul #export CUDA_HOME=$BASE_PATH/cuda-11.4
#make cuda11x_nomatmul CUDA_VERSION=114
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then #
# Control will enter here if $DIRECTORY doesn't exist. #if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
echo "Compilation unsuccessul!" 1>&2 # # Control will enter here if $DIRECTORY doesn't exist.
exit 64 # echo "Compilation unsuccessul!" 1>&2
fi # exit 64
CUDA_VERSION=111-nomatmul python -m build #fi
python -m twine upload dist/* --verbose --repository testpypi #CUDA_VERSION=114-nomatmul python -m build
#
rm -rf dist build #make clean
make clean #export CUDA_HOME=$BASE_PATH/cuda-11.5
make cleaneggs #make cuda11x_nomatmul CUDA_VERSION=115
export CUDA_HOME=$BASE_PATH/cuda-11.2 #
make cuda11x_nomatmul #if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
# # Control will enter here if $DIRECTORY doesn't exist.
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then # echo "Compilation unsuccessul!" 1>&2
# Control will enter here if $DIRECTORY doesn't exist. # exit 64
echo "Compilation unsuccessul!" 1>&2 #fi
exit 64 #CUDA_VERSION=115-nomatmul python -m build
fi #
CUDA_VERSION=112-nomatmul python -m build #make clean
python -m twine upload dist/* --verbose --repository testpypi #export CUDA_HOME=$BASE_PATH/cuda-11.6
#
rm -rf dist build #make cuda11x_nomatmul CUDA_VERSION=116
make clean #if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
make cleaneggs # # Control will enter here if $DIRECTORY doesn't exist.
export CUDA_HOME=$BASE_PATH/cuda-11.3 # echo "Compilation unsuccessul!" 1>&2
make cuda11x_nomatmul # exit 64
#fi
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then #CUDA_VERSION=116-nomatmul python -m build
# Control will enter here if $DIRECTORY doesn't exist. #
echo "Compilation unsuccessul!" 1>&2 #make clean
exit 64 #export CUDA_HOME=$BASE_PATH/cuda-11.7
fi #make cuda11x_nomatmul CUDA_VERSION=117
CUDA_VERSION=113-nomatmul python -m build #
python -m twine upload dist/* --verbose --repository testpypi #if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
# # Control will enter here if $DIRECTORY doesn't exist.
rm -rf dist build # echo "Compilation unsuccessul!" 1>&2
make clean # exit 64
make cleaneggs #fi
export CUDA_HOME=$BASE_PATH/cuda-11.4 #CUDA_VERSION=117-nomatmul python -m build
make cuda11x_nomatmul
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
# Control will enter here if $DIRECTORY doesn't exist.
echo "Compilation unsuccessul!" 1>&2
exit 64
fi
CUDA_VERSION=114-nomatmul python -m build
python -m twine upload dist/* --verbose --repository testpypi
rm -rf dist build
make clean
make cleaneggs
export CUDA_HOME=$BASE_PATH/cuda-11.5
make cuda11x_nomatmul
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
# Control will enter here if $DIRECTORY doesn't exist.
echo "Compilation unsuccessul!" 1>&2
exit 64
fi
CUDA_VERSION=115-nomatmul python -m build
python -m twine upload dist/* --verbose --repository testpypi
rm -rf dist build
make clean
make cleaneggs
export CUDA_HOME=$BASE_PATH/cuda-11.6
make cuda11x_nomatmul
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
# Control will enter here if $DIRECTORY doesn't exist.
echo "Compilation unsuccessul!" 1>&2
exit 64
fi
CUDA_VERSION=116-nomatmul python -m build
python -m twine upload dist/* --verbose --repository testpypi
rm -rf dist build
make clean
make cleaneggs
export CUDA_HOME=$BASE_PATH/cuda-11.7
make cuda11x_nomatmul
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
# Control will enter here if $DIRECTORY doesn't exist.
echo "Compilation unsuccessul!" 1>&2
exit 64
fi
CUDA_VERSION=117-nomatmul python -m build
python -m twine upload dist/* --verbose --repository testpypi python -m twine upload dist/* --verbose --repository testpypi

View File

@ -6,6 +6,15 @@ import os
from setuptools import setup, find_packages from setuptools import setup, find_packages
import os
def all_libs(directory):
paths = []
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
paths.append(os.path.join('..', path, filename))
return paths
def read(fname): def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read() return open(os.path.join(os.path.dirname(__file__), fname)).read()
@ -15,7 +24,7 @@ prefix = '' if version == 'cpu' else 'cuda'
setup( setup(
name=f"bitsandbytes-{prefix}{version}", name=f"bitsandbytes-{prefix}{version}",
version=f"0.30.0", version=f"0.30.2",
author="Tim Dettmers", author="Tim Dettmers",
author_email="dettmers@cs.washington.edu", author_email="dettmers@cs.washington.edu",
description="8-bit optimizers and matrix multiplication routines.", description="8-bit optimizers and matrix multiplication routines.",
@ -26,7 +35,7 @@ setup(
entry_points={ entry_points={
"console_scripts": ["debug_cuda = bitsandbytes.debug_cli:cli"], "console_scripts": ["debug_cuda = bitsandbytes.debug_cli:cli"],
}, },
package_data={'': ['libbitsandbytes.so']}, package_data={'': ['libbitsandbytes*.so']},
long_description=read('README.md'), long_description=read('README.md'),
long_description_content_type='text/markdown', long_description_content_type='text/markdown',
classifiers=[ classifiers=[