Build CUDA from Source

This is a note for Blog-1 and Blog-2:

git clone [email protected]:TimDettmers/bitsandbytes.git
cd bitsandbytes
export CUDA_HOME=/usr/local/cuda-12.1 && make cuda12x CUDA_VERSION=121
export CUDA_HOME=/usr/local/cuda-12.1 && make cuda12x_nomatmul CUDA_VERSION=121
CUDA_VERSION=121 && python setup.py install

This will generate 2 files one with approximately 7mb and other with 14mb

libbitsandbytes_cuda121.so
libbitsandbytes_cuda121_nocublaslt.so

Copy those files topython3.9/site-packages/bitsandbytes/.

你可能感兴趣的:(python,cuda)