diff --git a/Makefile b/Makefile index 328faa5..10f267a 100644 --- a/Makefile +++ b/Makefile @@ -27,14 +27,13 @@ COMPUTE_CAPABILITY += -gencode arch=compute_60,code=sm_60 # Pascal COMPUTE_CAPABILITY += -gencode arch=compute_61,code=sm_61 # Pascal COMPUTE_CAPABILITY += -gencode arch=compute_70,code=sm_70 # Volta COMPUTE_CAPABILITY += -gencode arch=compute_72,code=sm_72 # Volta -COMPUTE_CAPABILITY := -gencode arch=compute_75,code=sm_75 # Volta # CUDA 9.2 supports CC 3.0, but CUDA >= 11.0 does not CC_CUDA92 := -gencode arch=compute_30,code=sm_30 # Later versions of CUDA support the new architectures CC_CUDA10x := -gencode arch=compute_30,code=sm_30 -CC_CUDA10x := -gencode arch=compute_75,code=sm_75 +CC_CUDA10x += -gencode arch=compute_75,code=sm_75 CC_CUDA110 := -gencode arch=compute_75,code=sm_75 CC_CUDA110 += -gencode arch=compute_80,code=sm_80 @@ -43,6 +42,14 @@ CC_CUDA11x := -gencode arch=compute_75,code=sm_75 CC_CUDA11x += -gencode arch=compute_80,code=sm_80 CC_CUDA11x += -gencode arch=compute_86,code=sm_86 +CC_cublasLt110 := -gencode arch=compute_75,code=sm_75 +CC_cublasLt110 += -gencode arch=compute_80,code=sm_80 + +CC_cublasLt111 := -gencode arch=compute_75,code=sm_75 +CC_cublasLt111 += -gencode arch=compute_80,code=sm_80 +CC_cublasLt111 += -gencode arch=compute_86,code=sm_86 + + 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) -D NO_CUBLASLT $(NVCC) $(COMPUTE_CAPABILITY) -Xcompiler '-fPIC' -dlink $(BUILD_DIR)/ops.o $(BUILD_DIR)/kernels.o -o $(BUILD_DIR)/link.o @@ -53,21 +60,31 @@ cuda92: $(ROOT_DIR)/dependencies/cub $(BUILD_DIR) env $(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) -cuda10x: $(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) +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' -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) -cuda110: $(BUILD_DIR) env - $(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA110) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR) +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' -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) -cuda11x: $(BUILD_DIR) env - $(NVCC) $(COMPUTE_CAPABILITY) $(CC_CUDA11x) -Xcompiler '-fPIC' --use_fast_math -Xptxas=-v -dc $(FILES_CUDA) $(INCLUDE) $(LIB) --output-directory $(BUILD_DIR) +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' -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) +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' -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) + +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' -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) + cpuonly: $(BUILD_DIR) env $(GPP) -std=c++14 -shared -fPIC -I $(ROOT_DIR)/csrc -I $(ROOT_DIR)/include $(FILES_CPP) -o ./bitsandbytes/libbitsandbytes.so diff --git a/deploy_from_slurm.sh b/deploy_from_slurm.sh index 5a554bb..93233a4 100644 --- a/deploy_from_slurm.sh +++ b/deploy_from_slurm.sh @@ -4,88 +4,217 @@ BASE_PATH=$1 module unload cuda module unload gcc +#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 +# +#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 +# +#rm -rf dist build +#make clean +#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 +# +#rm -rf dist build +#make clean +#make cleaneggs +#export CUDA_HOME=$BASE_PATH/cuda-11.3 +#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 +# +#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 +# +#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 +# +#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 +# +#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 + + rm -rf dist build make clean make cleaneggs -export CUDA_HOME=$BASE_PATH/cuda-11.0 -make cuda110 +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. echo "Compilation unsuccessul!" 1>&2 exit 64 fi -#CUDA_VERSION=110 python -m build +#CUDA_VERSION=102-nomatmul python -m build #python -m twine upload dist/* --verbose + +rm -rf dist build +make clean +make cleaneggs +export CUDA_HOME=$BASE_PATH/cuda-11.0 +make cuda110_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=110-nomatmul python -m build +#python -m twine upload dist/* --verbose + + rm -rf dist build make clean make cleaneggs export CUDA_HOME=$BASE_PATH/cuda-11.1 -make cuda11x +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=111 python -m build +#CUDA_VERSION=111-nomatmul python -m build #python -m twine upload dist/* --verbose rm -rf dist build make clean make cleaneggs export CUDA_HOME=$BASE_PATH/cuda-11.2 -make cuda11x +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=112 python -m build +#CUDA_VERSION=112-nomatmul python -m build #python -m twine upload dist/* --verbose rm -rf dist build make clean make cleaneggs export CUDA_HOME=$BASE_PATH/cuda-11.3 -make cuda11x +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=113 python -m build +#CUDA_VERSION=113-nomatmul python -m build #python -m twine upload dist/* --verbose rm -rf dist build make clean make cleaneggs export CUDA_HOME=$BASE_PATH/cuda-11.4 -make cuda11x +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 python -m build +#CUDA_VERSION=114-nomatmul python -m build ##python -m twine upload dist/* --verbose rm -rf dist build make clean make cleaneggs export CUDA_HOME=$BASE_PATH/cuda-11.5 -make cuda11x +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 python -m build +#CUDA_VERSION=115-nomatmul python -m build #python -m twine upload dist/* --verbose rm -rf dist build @@ -93,25 +222,25 @@ make clean make cleaneggs export CUDA_HOME=$BASE_PATH/cuda-11.6 -make cuda11x +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 python -m build +#CUDA_VERSION=116-nomatmul python -m build #python -m twine upload dist/* --verbose rm -rf dist build make clean make cleaneggs export CUDA_HOME=$BASE_PATH/cuda-11.7 -make cuda11x +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 python -m build +#CUDA_VERSION=117-nomatmul python -m build #python -m twine upload dist/* --verbose