2021-10-06 02:16:20 +00:00
|
|
|
#!/bin/bash
|
2022-07-26 02:30:37 +00:00
|
|
|
BASE_PATH=$1
|
|
|
|
|
2022-07-27 12:57:50 +00:00
|
|
|
echo "MAKE SURE LD_LIBRARY_PATH IS EMPTY!"
|
|
|
|
echo $LD_LIBRARY_PATH
|
|
|
|
|
|
|
|
if [[ ! -z "${LD_LIBRARY_PATH}" ]]; then
|
|
|
|
echo "Compilation unsuccessul!" 1>&2
|
|
|
|
exit 64
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2023-07-10 16:53:23 +00:00
|
|
|
#module unload cuda && echo "no module function available. Probably not on a slurm cluster."
|
|
|
|
#module unload gcc && echo "no module function available. Probably not on a slurm cluster."
|
|
|
|
#
|
|
|
|
#rm -rf dist build
|
|
|
|
#make cleaneggs
|
|
|
|
#make cleanlibs
|
|
|
|
#
|
|
|
|
#make clean
|
|
|
|
#export CUDA_HOME=
|
|
|
|
#export CUDA_VERSION=
|
|
|
|
#make cpuonly CUDA_VERSION="CPU"
|
|
|
|
#
|
|
|
|
#if [ ! -f "./bitsandbytes/libbitsandbytes_cpu.so" ]; then
|
|
|
|
# # Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
# echo "Compilation unsuccessul!" 1>&2
|
|
|
|
# exit 64
|
|
|
|
#fi
|
|
|
|
#
|
|
|
|
#make clean
|
|
|
|
#export CUDA_HOME=$BASE_PATH/cuda-11.0
|
|
|
|
#make cuda110 CUDA_VERSION=110
|
|
|
|
#
|
|
|
|
#if [ ! -f "./bitsandbytes/libbitsandbytes_cuda110.so" ]; then
|
|
|
|
# # Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
# echo "Compilation unsuccessul!" 1>&2
|
|
|
|
# exit 64
|
|
|
|
#fi
|
|
|
|
#
|
|
|
|
#make clean
|
|
|
|
#export CUDA_HOME=$BASE_PATH/cuda-11.1
|
|
|
|
#make cuda11x CUDA_VERSION=111
|
|
|
|
#
|
|
|
|
#if [ ! -f "./bitsandbytes/libbitsandbytes_cuda111.so" ]; then
|
|
|
|
# # Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
# echo "Compilation unsuccessul!" 1>&2
|
|
|
|
# exit 64
|
|
|
|
#fi
|
|
|
|
#
|
|
|
|
#make clean
|
|
|
|
#export CUDA_HOME=$BASE_PATH/cuda-11.4
|
|
|
|
#make cuda11x CUDA_VERSION=114
|
|
|
|
#
|
|
|
|
#if [ ! -f "./bitsandbytes/libbitsandbytes_cuda114.so" ]; then
|
|
|
|
# # Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
# echo "Compilation unsuccessul!" 1>&2
|
|
|
|
# exit 64
|
|
|
|
#fi
|
|
|
|
#
|
|
|
|
#make clean
|
|
|
|
#export CUDA_HOME=$BASE_PATH/cuda-11.5
|
|
|
|
#make cuda11x CUDA_VERSION=115
|
|
|
|
#
|
|
|
|
#if [ ! -f "./bitsandbytes/libbitsandbytes_cuda115.so" ]; then
|
|
|
|
# # Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
# echo "Compilation unsuccessul!" 1>&2
|
|
|
|
# exit 64
|
|
|
|
#fi
|
|
|
|
#
|
|
|
|
#make clean
|
|
|
|
#export CUDA_HOME=$BASE_PATH/cuda-11.7
|
|
|
|
#make cuda11x CUDA_VERSION=117
|
|
|
|
#
|
|
|
|
#if [ ! -f "./bitsandbytes/libbitsandbytes_cuda117.so" ]; then
|
|
|
|
# # Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
# echo "Compilation unsuccessul!" 1>&2
|
|
|
|
# exit 64
|
|
|
|
#fi
|
2022-08-01 03:59:34 +00:00
|
|
|
|
2022-10-10 02:02:28 +00:00
|
|
|
make clean
|
|
|
|
export CUDA_HOME=$BASE_PATH/cuda-11.8
|
2023-01-04 10:28:33 +00:00
|
|
|
make cuda12x CUDA_VERSION=118
|
2022-10-10 02:02:28 +00:00
|
|
|
|
|
|
|
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda118.so" ]; then
|
|
|
|
# Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
echo "Compilation unsuccessul!" 1>&2
|
|
|
|
exit 64
|
|
|
|
fi
|
|
|
|
|
2023-01-04 10:28:33 +00:00
|
|
|
make clean
|
|
|
|
export CUDA_HOME=$BASE_PATH/cuda-12.0
|
|
|
|
make cuda12x CUDA_VERSION=120
|
|
|
|
|
|
|
|
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda120.so" ]; then
|
|
|
|
# Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
echo "Compilation unsuccessul!" 1>&2
|
|
|
|
exit 64
|
|
|
|
fi
|
|
|
|
|
2023-03-21 21:06:08 +00:00
|
|
|
make clean
|
|
|
|
export CUDA_HOME=$BASE_PATH/cuda-12.1
|
|
|
|
make cuda12x CUDA_VERSION=121
|
|
|
|
|
|
|
|
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda121.so" ]; then
|
|
|
|
# Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
echo "Compilation unsuccessul!" 1>&2
|
2022-08-01 03:59:34 +00:00
|
|
|
exit 64
|
|
|
|
fi
|
|
|
|
|
|
|
|
make clean
|
2023-07-10 16:53:23 +00:00
|
|
|
export CUDA_HOME=$BASE_PATH/cuda-12.2
|
|
|
|
make cuda12x CUDA_VERSION=122
|
2022-08-01 03:59:34 +00:00
|
|
|
|
2023-07-10 16:53:23 +00:00
|
|
|
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda122.so" ]; then
|
2022-08-01 03:59:34 +00:00
|
|
|
# Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
echo "Compilation unsuccessul!" 1>&2
|
|
|
|
exit 64
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
make clean
|
2023-07-10 16:53:23 +00:00
|
|
|
export CUDA_HOME=$BASE_PATH/cuda-11.0
|
|
|
|
make cuda110_nomatmul CUDA_VERSION=110
|
2022-08-01 03:59:34 +00:00
|
|
|
|
2023-07-10 16:53:23 +00:00
|
|
|
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda110_nocublaslt.so" ]; then
|
2022-08-01 03:59:34 +00:00
|
|
|
# Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
echo "Compilation unsuccessul!" 1>&2
|
|
|
|
exit 64
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
make clean
|
2023-07-10 16:53:23 +00:00
|
|
|
export CUDA_HOME=$BASE_PATH/cuda-11.1
|
|
|
|
make cuda11x_nomatmul CUDA_VERSION=111
|
2022-08-01 03:59:34 +00:00
|
|
|
|
2023-07-10 16:53:23 +00:00
|
|
|
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda111_nocublaslt.so" ]; then
|
2022-08-01 03:59:34 +00:00
|
|
|
# Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
echo "Compilation unsuccessul!" 1>&2
|
|
|
|
exit 64
|
|
|
|
fi
|
|
|
|
|
|
|
|
make clean
|
|
|
|
export CUDA_HOME=$BASE_PATH/cuda-11.4
|
|
|
|
make cuda11x_nomatmul CUDA_VERSION=114
|
|
|
|
|
|
|
|
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda114_nocublaslt.so" ]; then
|
|
|
|
# Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
echo "Compilation unsuccessul!" 1>&2
|
|
|
|
exit 64
|
|
|
|
fi
|
|
|
|
|
|
|
|
make clean
|
|
|
|
export CUDA_HOME=$BASE_PATH/cuda-11.5
|
|
|
|
make cuda11x_nomatmul CUDA_VERSION=115
|
|
|
|
|
|
|
|
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda115_nocublaslt.so" ]; then
|
|
|
|
# Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
echo "Compilation unsuccessul!" 1>&2
|
|
|
|
exit 64
|
|
|
|
fi
|
|
|
|
|
|
|
|
make clean
|
|
|
|
export CUDA_HOME=$BASE_PATH/cuda-11.7
|
|
|
|
make cuda11x_nomatmul CUDA_VERSION=117
|
|
|
|
|
|
|
|
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda117_nocublaslt.so" ]; then
|
|
|
|
# Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
echo "Compilation unsuccessul!" 1>&2
|
|
|
|
exit 64
|
|
|
|
fi
|
2022-07-26 02:30:37 +00:00
|
|
|
|
2022-10-10 02:02:28 +00:00
|
|
|
make clean
|
|
|
|
export CUDA_HOME=$BASE_PATH/cuda-11.8
|
2023-01-04 10:28:33 +00:00
|
|
|
make cuda12x_nomatmul CUDA_VERSION=118
|
2022-10-10 02:02:28 +00:00
|
|
|
|
|
|
|
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda118_nocublaslt.so" ]; then
|
|
|
|
# Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
echo "Compilation unsuccessul!" 1>&2
|
|
|
|
exit 64
|
|
|
|
fi
|
|
|
|
|
2023-01-04 10:28:33 +00:00
|
|
|
make clean
|
|
|
|
export CUDA_HOME=$BASE_PATH/cuda-12.0
|
|
|
|
make cuda12x_nomatmul CUDA_VERSION=120
|
|
|
|
|
|
|
|
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda120_nocublaslt.so" ]; then
|
|
|
|
# Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
echo "Compilation unsuccessul!" 1>&2
|
|
|
|
exit 64
|
|
|
|
fi
|
|
|
|
|
2023-03-21 21:06:08 +00:00
|
|
|
make clean
|
|
|
|
export CUDA_HOME=$BASE_PATH/cuda-12.1
|
|
|
|
make cuda12x_nomatmul CUDA_VERSION=121
|
|
|
|
|
|
|
|
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda121_nocublaslt.so" ]; then
|
|
|
|
# Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
echo "Compilation unsuccessul!" 1>&2
|
|
|
|
exit 64
|
|
|
|
fi
|
|
|
|
|
2023-07-10 16:53:23 +00:00
|
|
|
make clean
|
|
|
|
export CUDA_HOME=$BASE_PATH/cuda-12.2
|
|
|
|
make cuda12x_nomatmul CUDA_VERSION=122
|
|
|
|
|
|
|
|
if [ ! -f "./bitsandbytes/libbitsandbytes_cuda122_nocublaslt.so" ]; then
|
|
|
|
# Control will enter here if $DIRECTORY doesn't exist.
|
|
|
|
echo "Compilation unsuccessul!" 1>&2
|
|
|
|
exit 64
|
|
|
|
fi
|
|
|
|
|
2022-08-01 03:59:34 +00:00
|
|
|
python -m build
|
2022-08-10 03:02:47 +00:00
|
|
|
python -m twine upload dist/* --verbose
|