forked from mrq/bitsandbytes-rocm
Fixed cpuonly build.
This commit is contained in:
parent
f2dd703251
commit
953b7285dd
|
@ -82,7 +82,6 @@ void quantizeBlockwise_stochastic_fp32(float * code, float *A, float *absmax, un
|
||||||
|
|
||||||
void dequantizeBlockwise_fp16(float *code, unsigned char *A, float *absmax, half *out, int blocksize, const int n){ dequantizeBlockwise<half>(code, A, absmax, out, blocksize, n); } \
|
void dequantizeBlockwise_fp16(float *code, unsigned char *A, float *absmax, half *out, int blocksize, const int n){ dequantizeBlockwise<half>(code, A, absmax, out, blocksize, n); } \
|
||||||
void dequantizeBlockwise_fp32(float *code, unsigned char *A, float *absmax, float *out, int blocksize, const int n){ dequantizeBlockwise<float>(code, A, absmax, out, blocksize, n); }
|
void dequantizeBlockwise_fp32(float *code, unsigned char *A, float *absmax, float *out, int blocksize, const int n){ dequantizeBlockwise<float>(code, A, absmax, out, blocksize, n); }
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MAKE_FUNC_TRANSFORM(fbits, fsrc, ftrgt, ftranspose, dtype, src, target, transpose, bits) \
|
#define MAKE_FUNC_TRANSFORM(fbits, fsrc, ftrgt, ftranspose, dtype, src, target, transpose, bits) \
|
||||||
void transform_##fbits##_##fsrc##_to_##ftrgt##_##ftranspose(cublasLtHandle_t ltHandle, dtype *A, dtype *out, int dim1, int dim2) \
|
void transform_##fbits##_##fsrc##_to_##ftrgt##_##ftranspose(cublasLtHandle_t ltHandle, dtype *A, dtype *out, int dim1, int dim2) \
|
||||||
|
@ -129,10 +128,11 @@ void spmm_coo_very_sparse_naive_fp16(int *max_count, int *max_idx, int *offset_r
|
||||||
|
|
||||||
void spmm_coo_very_sparse_naive_int8(int *max_count, int *max_idx, int *offset_rowidx, int *rowidx, int *colidx, half *values, signed char *B, half *out, float *dequant_stats, int nnz_rows, int nnz, int rowsA, int rowsB, int colsB)
|
void spmm_coo_very_sparse_naive_int8(int *max_count, int *max_idx, int *offset_rowidx, int *rowidx, int *colidx, half *values, signed char *B, half *out, float *dequant_stats, int nnz_rows, int nnz, int rowsA, int rowsB, int colsB)
|
||||||
{ spmm_coo_very_sparse_naive<signed char, 8>(max_count, max_idx, offset_rowidx, rowidx, colidx, values, B, out, dequant_stats, nnz_rows, nnz, rowsA, rowsB, colsB); }
|
{ spmm_coo_very_sparse_naive<signed char, 8>(max_count, max_idx, offset_rowidx, rowidx, colidx, values, B, out, dequant_stats, nnz_rows, nnz, rowsA, rowsB, colsB); }
|
||||||
|
#endif
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#if BUILD_CUDA
|
#if BUILD_CUDA
|
||||||
void cestimate_quantiles_fp32(float *A, float *code, float offset, int n){ estimateQuantiles_fp32(A, code, offset, n); }
|
void cestimate_quantiles_fp32(float *A, float *code, float offset, int n){ estimateQuantiles_fp32(A, code, offset, n); }
|
||||||
void cestimate_quantiles_fp16(half *A, float *code, float offset, int n){ estimateQuantiles_fp16(A, code, offset, n); }
|
void cestimate_quantiles_fp16(half *A, float *code, float offset, int n){ estimateQuantiles_fp16(A, code, offset, n); }
|
||||||
void cquantize(float *code, float *A, unsigned char *out, int n){ quantize(code, A, out, n); }
|
void cquantize(float *code, float *A, unsigned char *out, int n){ quantize(code, A, out, n); }
|
||||||
|
|
|
@ -4,117 +4,131 @@ BASE_PATH=$1
|
||||||
module unload cuda
|
module unload cuda
|
||||||
module unload gcc
|
module unload gcc
|
||||||
|
|
||||||
#rm -rf dist build
|
rm -rf dist build
|
||||||
#make clean
|
make clean
|
||||||
#make cleaneggs
|
make cleaneggs
|
||||||
#export CUDA_HOME=$BASE_PATH/cuda-11.0
|
export CUDA_HOME=
|
||||||
#make cuda110
|
make cpuonly
|
||||||
#
|
|
||||||
#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
|
CUDA_VERSION=cpu python -m build
|
||||||
##python -m twine upload dist/* --verbose
|
python -m twine upload dist/* --verbose
|
||||||
#
|
|
||||||
#rm -rf dist build
|
rm -rf dist build
|
||||||
#make clean
|
make clean
|
||||||
#make cleaneggs
|
make cleaneggs
|
||||||
#export CUDA_HOME=$BASE_PATH/cuda-11.1
|
export CUDA_HOME=$BASE_PATH/cuda-11.0
|
||||||
#make cuda11x
|
make cuda110
|
||||||
#
|
|
||||||
#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=111 python -m build
|
CUDA_VERSION=110 python -m build
|
||||||
##python -m twine upload dist/* --verbose
|
python -m twine upload dist/* --verbose
|
||||||
#
|
|
||||||
#rm -rf dist build
|
rm -rf dist build
|
||||||
#make clean
|
make clean
|
||||||
#make cleaneggs
|
make cleaneggs
|
||||||
#export CUDA_HOME=$BASE_PATH/cuda-11.2
|
export CUDA_HOME=$BASE_PATH/cuda-11.1
|
||||||
#make cuda11x
|
make cuda11x
|
||||||
#
|
|
||||||
#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=112 python -m build
|
CUDA_VERSION=111 python -m build
|
||||||
##python -m twine upload dist/* --verbose
|
python -m twine upload dist/* --verbose
|
||||||
#
|
|
||||||
#rm -rf dist build
|
rm -rf dist build
|
||||||
#make clean
|
make clean
|
||||||
#make cleaneggs
|
make cleaneggs
|
||||||
#export CUDA_HOME=$BASE_PATH/cuda-11.3
|
export CUDA_HOME=$BASE_PATH/cuda-11.2
|
||||||
#make cuda11x
|
make cuda11x
|
||||||
#
|
|
||||||
#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=112 python -m build
|
||||||
##python -m twine upload dist/* --verbose
|
python -m twine upload dist/* --verbose
|
||||||
#
|
|
||||||
#rm -rf dist build
|
rm -rf dist build
|
||||||
#make clean
|
make clean
|
||||||
#make cleaneggs
|
make cleaneggs
|
||||||
#export CUDA_HOME=$BASE_PATH/cuda-11.4
|
export CUDA_HOME=$BASE_PATH/cuda-11.3
|
||||||
#make cuda11x
|
make cuda11x
|
||||||
#
|
|
||||||
#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 python -m build
|
||||||
###python -m twine upload dist/* --verbose
|
python -m twine upload dist/* --verbose
|
||||||
#
|
|
||||||
#rm -rf dist build
|
rm -rf dist build
|
||||||
#make clean
|
make clean
|
||||||
#make cleaneggs
|
make cleaneggs
|
||||||
#export CUDA_HOME=$BASE_PATH/cuda-11.5
|
export CUDA_HOME=$BASE_PATH/cuda-11.4
|
||||||
#make cuda11x
|
make cuda11x
|
||||||
#
|
|
||||||
#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=115 python -m build
|
CUDA_VERSION=114 python -m build
|
||||||
##python -m twine upload dist/* --verbose
|
python -m twine upload dist/* --verbose
|
||||||
#
|
|
||||||
#rm -rf dist build
|
rm -rf dist build
|
||||||
#make clean
|
make clean
|
||||||
#make cleaneggs
|
make cleaneggs
|
||||||
#export CUDA_HOME=$BASE_PATH/cuda-11.6
|
export CUDA_HOME=$BASE_PATH/cuda-11.5
|
||||||
#
|
make cuda11x
|
||||||
#make cuda11x
|
|
||||||
#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=116 python -m build
|
CUDA_VERSION=115 python -m build
|
||||||
##python -m twine upload dist/* --verbose
|
python -m twine upload dist/* --verbose
|
||||||
#
|
|
||||||
#rm -rf dist build
|
rm -rf dist build
|
||||||
#make clean
|
make clean
|
||||||
#make cleaneggs
|
make cleaneggs
|
||||||
#export CUDA_HOME=$BASE_PATH/cuda-11.7
|
export CUDA_HOME=$BASE_PATH/cuda-11.6
|
||||||
#make cuda11x
|
|
||||||
#
|
make cuda11x
|
||||||
#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=117 python -m build
|
CUDA_VERSION=116 python -m build
|
||||||
##python -m twine upload dist/* --verbose
|
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
|
rm -rf dist build
|
||||||
|
@ -128,8 +142,8 @@ if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
|
||||||
echo "Compilation unsuccessul!" 1>&2
|
echo "Compilation unsuccessul!" 1>&2
|
||||||
exit 64
|
exit 64
|
||||||
fi
|
fi
|
||||||
#CUDA_VERSION=102-nomatmul python -m build
|
CUDA_VERSION=102-nomatmul python -m build
|
||||||
#python -m twine upload dist/* --verbose
|
python -m twine upload dist/* --verbose
|
||||||
|
|
||||||
|
|
||||||
rm -rf dist build
|
rm -rf dist build
|
||||||
|
@ -143,8 +157,8 @@ if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
|
||||||
echo "Compilation unsuccessul!" 1>&2
|
echo "Compilation unsuccessul!" 1>&2
|
||||||
exit 64
|
exit 64
|
||||||
fi
|
fi
|
||||||
#CUDA_VERSION=110-nomatmul python -m build
|
CUDA_VERSION=110-nomatmul python -m build
|
||||||
#python -m twine upload dist/* --verbose
|
python -m twine upload dist/* --verbose
|
||||||
|
|
||||||
|
|
||||||
rm -rf dist build
|
rm -rf dist build
|
||||||
|
@ -158,8 +172,8 @@ if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
|
||||||
echo "Compilation unsuccessul!" 1>&2
|
echo "Compilation unsuccessul!" 1>&2
|
||||||
exit 64
|
exit 64
|
||||||
fi
|
fi
|
||||||
#CUDA_VERSION=111-nomatmul python -m build
|
CUDA_VERSION=111-nomatmul python -m build
|
||||||
#python -m twine upload dist/* --verbose
|
python -m twine upload dist/* --verbose
|
||||||
|
|
||||||
rm -rf dist build
|
rm -rf dist build
|
||||||
make clean
|
make clean
|
||||||
|
@ -172,8 +186,8 @@ if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
|
||||||
echo "Compilation unsuccessul!" 1>&2
|
echo "Compilation unsuccessul!" 1>&2
|
||||||
exit 64
|
exit 64
|
||||||
fi
|
fi
|
||||||
#CUDA_VERSION=112-nomatmul python -m build
|
CUDA_VERSION=112-nomatmul python -m build
|
||||||
#python -m twine upload dist/* --verbose
|
python -m twine upload dist/* --verbose
|
||||||
|
|
||||||
rm -rf dist build
|
rm -rf dist build
|
||||||
make clean
|
make clean
|
||||||
|
@ -186,8 +200,8 @@ if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
|
||||||
echo "Compilation unsuccessul!" 1>&2
|
echo "Compilation unsuccessul!" 1>&2
|
||||||
exit 64
|
exit 64
|
||||||
fi
|
fi
|
||||||
#CUDA_VERSION=113-nomatmul python -m build
|
CUDA_VERSION=113-nomatmul python -m build
|
||||||
#python -m twine upload dist/* --verbose
|
python -m twine upload dist/* --verbose
|
||||||
|
|
||||||
rm -rf dist build
|
rm -rf dist build
|
||||||
make clean
|
make clean
|
||||||
|
@ -200,8 +214,8 @@ if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
|
||||||
echo "Compilation unsuccessul!" 1>&2
|
echo "Compilation unsuccessul!" 1>&2
|
||||||
exit 64
|
exit 64
|
||||||
fi
|
fi
|
||||||
#CUDA_VERSION=114-nomatmul python -m build
|
CUDA_VERSION=114-nomatmul python -m build
|
||||||
##python -m twine upload dist/* --verbose
|
python -m twine upload dist/* --verbose
|
||||||
|
|
||||||
rm -rf dist build
|
rm -rf dist build
|
||||||
make clean
|
make clean
|
||||||
|
@ -214,8 +228,8 @@ if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
|
||||||
echo "Compilation unsuccessul!" 1>&2
|
echo "Compilation unsuccessul!" 1>&2
|
||||||
exit 64
|
exit 64
|
||||||
fi
|
fi
|
||||||
#CUDA_VERSION=115-nomatmul python -m build
|
CUDA_VERSION=115-nomatmul python -m build
|
||||||
#python -m twine upload dist/* --verbose
|
python -m twine upload dist/* --verbose
|
||||||
|
|
||||||
rm -rf dist build
|
rm -rf dist build
|
||||||
make clean
|
make clean
|
||||||
|
@ -228,8 +242,8 @@ if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
|
||||||
echo "Compilation unsuccessul!" 1>&2
|
echo "Compilation unsuccessul!" 1>&2
|
||||||
exit 64
|
exit 64
|
||||||
fi
|
fi
|
||||||
#CUDA_VERSION=116-nomatmul python -m build
|
CUDA_VERSION=116-nomatmul python -m build
|
||||||
#python -m twine upload dist/* --verbose
|
python -m twine upload dist/* --verbose
|
||||||
|
|
||||||
rm -rf dist build
|
rm -rf dist build
|
||||||
make clean
|
make clean
|
||||||
|
@ -242,5 +256,5 @@ if [ ! -f "./bitsandbytes/libbitsandbytes.so" ]; then
|
||||||
echo "Compilation unsuccessul!" 1>&2
|
echo "Compilation unsuccessul!" 1>&2
|
||||||
exit 64
|
exit 64
|
||||||
fi
|
fi
|
||||||
#CUDA_VERSION=117-nomatmul python -m build
|
CUDA_VERSION=117-nomatmul python -m build
|
||||||
#python -m twine upload dist/* --verbose
|
python -m twine upload dist/* --verbose
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -14,7 +14,7 @@ version = os.getenv("CUDA_VERSION", "cpu")
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="bitsandbytes",
|
name="bitsandbytes",
|
||||||
version=f"0.26.0+{version}",
|
version=f"0.30.0",
|
||||||
author="Tim Dettmers",
|
author="Tim Dettmers",
|
||||||
author_email="dettmers@cs.washington.edu",
|
author_email="dettmers@cs.washington.edu",
|
||||||
description="8-bit optimizers and quantization routines.",
|
description="8-bit optimizers and quantization routines.",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user