From 4a6ea7e24b933bf574f7707e1b331ea62f7e7273 Mon Sep 17 00:00:00 2001 From: Tim Dettmers Date: Sun, 31 Jul 2022 20:59:34 -0700 Subject: Added adjusted build file. --- deploy_from_slurm.sh | 358 +++++++++++++++++++++++++-------------------------- 1 file changed, 173 insertions(+), 185 deletions(-) (limited to 'deploy_from_slurm.sh') diff --git a/deploy_from_slurm.sh b/deploy_from_slurm.sh index 4aab04f..c6ee84d 100644 --- a/deploy_from_slurm.sh +++ b/deploy_from_slurm.sh @@ -15,12 +15,14 @@ module unload gcc rm -rf dist build make cleaneggs +make cleanlibs make clean export CUDA_HOME= -make cpuonly CUDA_VERSION=CPU +export CUDA_VERSION= +make cpuonly CUDA_VERSION="CPU" -if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then +if [ ! -f "./bitsandbytes/libbitsandbytes_cpu.so" ]; then # Control will enter here if $DIRECTORY doesn't exist. echo "Compilation unsuccessul!" 1>&2 exit 64 @@ -30,188 +32,174 @@ make clean export CUDA_HOME=$BASE_PATH/cuda-11.0 make cuda110 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 - -#make clean -#export CUDA_HOME=$BASE_PATH/cuda-11.1 -#make cuda11x 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 -# -#make clean -#export CUDA_HOME=$BASE_PATH/cuda-11.2 -#make cuda11x 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 python -m build -# -#make clean -#export CUDA_HOME=$BASE_PATH/cuda-11.3 -#make cuda11x 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 python -m build -# -#make clean -#export CUDA_HOME=$BASE_PATH/cuda-11.4 -#make cuda11x 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 python -m build -# -#make clean -#export CUDA_HOME=$BASE_PATH/cuda-11.5 -#make cuda11x 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 python -m build -# -#make clean -#export CUDA_HOME=$BASE_PATH/cuda-11.6 -# -#make cuda11x 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 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_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.2 +make cuda11x CUDA_VERSION=112 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda112.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.3 +make cuda11x CUDA_VERSION=113 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda113.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.6 + +make cuda11x CUDA_VERSION=116 +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda116.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 + + +make clean +export CUDA_HOME=$BASE_PATH/cuda-10.2 +make cuda10x_nomatmul CUDA_VERSION=102 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda102_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.0 +make cuda110_nomatmul CUDA_VERSION=110 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda110_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.1 +make cuda11x_nomatmul CUDA_VERSION=111 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda111_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.2 +make cuda11x_nomatmul CUDA_VERSION=112 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda112_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.3 +make cuda11x_nomatmul CUDA_VERSION=113 + +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda113_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.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.6 + +make cuda11x_nomatmul CUDA_VERSION=116 +if [ ! -f "./bitsandbytes/libbitsandbytes_cuda116_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 +python -m build python -m twine upload dist/* --verbose --repository testpypi -- cgit v1.2.3