Commit 28d1e7dc authored by Tim Dettmers's avatar Tim Dettmers
Browse files

Initial build script changes (untested on PyPi).

parent dd50382b
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 ...@@ -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: ...@@ -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*
...@@ -133,7 +133,7 @@ def evaluate_cuda_setup(): ...@@ -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']
......
...@@ -14,256 +14,204 @@ module unload cuda ...@@ -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
export CUDA_HOME=
make cpuonly
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=cpu 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.0
make cuda110
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=110 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.1
make cuda11x
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=111 python -m build
python -m twine upload dist/* --verbose --repository testpypi
rm -rf dist build
make clean
make cleaneggs make cleaneggs
export CUDA_HOME=$BASE_PATH/cuda-11.2
make cuda11x
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=112 python -m build
python -m twine upload dist/* --verbose --repository testpypi
rm -rf dist build
make clean make clean
make cleaneggs export CUDA_HOME=
export CUDA_HOME=$BASE_PATH/cuda-11.3 make cpuonly CUDA_VERSION=CPU
make cuda11x
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=113 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.4
make cuda11x
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 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
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 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
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 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
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 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-10.2
make cuda10x_nomatmul
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=102-nomatmul 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_nomatmul 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-nomatmul python -m build
python -m twine upload dist/* --verbose --repository testpypi #make clean
#export CUDA_HOME=$BASE_PATH/cuda-11.1
#make cuda11x CUDA_VERSION=111
rm -rf dist build #
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.1 # echo "Compilation unsuccessul!" 1>&2
make cuda11x_nomatmul # exit 64
#fi
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.2
exit 64 #make cuda11x CUDA_VERSION=112
fi #
CUDA_VERSION=111-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
rm -rf dist build # exit 64
make clean #fi
make cleaneggs #CUDA_VERSION=112 python -m build
export CUDA_HOME=$BASE_PATH/cuda-11.2 #
make cuda11x_nomatmul #make clean
#export CUDA_HOME=$BASE_PATH/cuda-11.3
if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then #make cuda11x CUDA_VERSION=113
# 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=112-nomatmul python -m build # exit 64
python -m twine upload dist/* --verbose --repository testpypi #fi
#CUDA_VERSION=113 python -m build
rm -rf dist build #
make clean #make clean
make cleaneggs #export CUDA_HOME=$BASE_PATH/cuda-11.4
export CUDA_HOME=$BASE_PATH/cuda-11.3 #make cuda11x CUDA_VERSION=114
make cuda11x_nomatmul #
#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=114 python -m build
CUDA_VERSION=113-nomatmul python -m build #
python -m twine upload dist/* --verbose --repository testpypi #make clean
#export CUDA_HOME=$BASE_PATH/cuda-11.5
rm -rf dist build #make cuda11x CUDA_VERSION=115
make clean #
make cleaneggs #if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
export CUDA_HOME=$BASE_PATH/cuda-11.4 # # Control will enter here if $DIRECTORY doesn't exist.
make cuda11x_nomatmul # 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=115 python -m build
echo "Compilation unsuccessul!" 1>&2 #
exit 64 #make clean
fi #export CUDA_HOME=$BASE_PATH/cuda-11.6
CUDA_VERSION=114-nomatmul python -m build #
python -m twine upload dist/* --verbose --repository testpypi #make cuda11x CUDA_VERSION=116
#if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
rm -rf dist build # # Control will enter here if $DIRECTORY doesn't exist.
make clean # echo "Compilation unsuccessul!" 1>&2
make cleaneggs # exit 64
export CUDA_HOME=$BASE_PATH/cuda-11.5 #fi
make cuda11x_nomatmul #CUDA_VERSION=116 python -m build
#
#make clean
#export CUDA_HOME=$BASE_PATH/cuda-11.7
#make cuda11x CUDA_VERSION=117
#
#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 python -m build
#
#
#make clean
#export CUDA_HOME=$BASE_PATH/cuda-10.2
#make cuda10x_nomatmul CUDA_VERSION=102
#
#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=102-nomatmul python -m build
#
#
#make clean
#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.
# echo "Compilation unsuccessul!" 1>&2
# exit 64
#fi
#CUDA_VERSION=110-nomatmul python -m build
#
#
#make clean
#export CUDA_HOME=$BASE_PATH/cuda-11.1
#make cuda11x_nomatmul CUDA_VERSION=111
#
#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=111-nomatmul python -m build
#
#make clean
#export CUDA_HOME=$BASE_PATH/cuda-11.2
#make cuda11x_nomatmul CUDA_VERSION=112
#
#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=112-nomatmul python -m build
#
#make clean
#export CUDA_HOME=$BASE_PATH/cuda-11.3
#make cuda11x_nomatmul CUDA_VERSION=113
#
#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=113-nomatmul python -m build
#
#make clean
#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.
# echo "Compilation unsuccessul!" 1>&2
# exit 64
#fi
#CUDA_VERSION=114-nomatmul python -m build
#
#make clean
#export CUDA_HOME=$BASE_PATH/cuda-11.5
#make cuda11x_nomatmul CUDA_VERSION=115
#
#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
#
#make clean
#export CUDA_HOME=$BASE_PATH/cuda-11.6
#
#make cuda11x_nomatmul CUDA_VERSION=116
#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
#
#make clean
#export CUDA_HOME=$BASE_PATH/cuda-11.7
#make cuda11x_nomatmul CUDA_VERSION=117
#
#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
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
...@@ -6,6 +6,15 @@ import os ...@@ -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' ...@@ -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( ...@@ -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=[
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment