Skip to content

libbitsandbytes_cpu.so,libbitsandbytes_cuda124_nocublaslt124.so #1312

@magicwang1111

Description

@magicwang1111

System Info

linux
cuda 12.4
(flux) [wangxi@v100-4 bitsandbytes]$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Tue_Feb_27_16:19:38_PST_2024
Cuda compilation tools, release 12.4, V12.4.99
Build cuda_12.4.r12.4/compiler.33961263_0
(flux) [wangxi@v100-4 bitsandbytes]$

export PATH=/home/wangxi/temp/gcc_11.3.0/bin:$PATH
export LD_LIBRARY_PATH=/home/wangxi/temp/gcc_11.3.0/lib64:$LD_LIBRARY_PATH
export CUDA_HOME=/mnt/data/wangxi/cuda-12.4/
export PATH=/mnt/data/wangxi/cuda-12.4/bin:$PATH
export LD_LIBRARY_PATH=$CUDA_HOME/lib64:$LD_LIBRARY_PATH
#export LD_LIBRARY_PATH=/mnt/data/wangxi/cuda-11.8/lib64:$LD_LIBRARY_PATH
export HF_ENDPOINT=https://hf-mirror.com
export CC=gcc
export CXX=g++
export AM_I_DOCKER=False
export BUILD_WITH_CUDA=True
export GUROBI_HOME="/mnt/data/shared_data/gurobi/gurobi1102/linux64"
export PATH="${PATH}:${GUROBI_HOME}/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib"
export GRB_LICENSE_FILE="/mnt/data/shared_data/gurobi.lic"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib
export BNB_CUDA_VERSION=124
export PATH="/mnt/data/wangxi/cmake/cmake/bin:$PATH"

Reproduction

(flux) [wangxi@v100-4 bitsandbytes]$ python -c "import bitsandbytes as bnb; print(bnb.version)"
WARNING: BNB_CUDA_VERSION=124 environment variable detected; loading libbitsandbytes_cuda124_nocublaslt124.so.
This can be used to load a bitsandbytes version that is different from the PyTorch CUDA version.
If this was unintended set the BNB_CUDA_VERSION variable to an empty string: export BNB_CUDA_VERSION=
If you use the manual override make sure the right libcudart.so is in your LD_LIBRARY_PATH
For example by adding the following to your .bashrc: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path_to_cuda_dir/lib64

Could not find the bitsandbytes CUDA binary at PosixPath('/home/wangxi/bitsandbytes/bitsandbytes/libbitsandbytes_cuda124_nocublaslt124.so')
Could not load bitsandbytes native library: /home/wangxi/bitsandbytes/bitsandbytes/libbitsandbytes_cpu.so: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "/home/wangxi/bitsandbytes/bitsandbytes/cextension.py", line 109, in
lib = get_native_library()
File "/home/wangxi/bitsandbytes/bitsandbytes/cextension.py", line 96, in get_native_library
dll = ct.cdll.LoadLibrary(str(binary_path))
File "/home/wangxi/miniconda3/envs/flux/lib/python3.10/ctypes/init.py", line 452, in LoadLibrary
return self._dlltype(name)
File "/home/wangxi/miniconda3/envs/flux/lib/python3.10/ctypes/init.py", line 374, in init
self._handle = _dlopen(self._name, mode)
OSError: /home/wangxi/bitsandbytes/bitsandbytes/libbitsandbytes_cpu.so: cannot open shared object file: No such file or directory

CUDA Setup failed despite CUDA being available. Please run the following command to get more information:

python -m bitsandbytes

Inspect the output of the command and see if you can locate CUDA libraries. You might need to add them
to your LD_LIBRARY_PATH. If you suspect a bug, please take the information from python -m bitsandbytes
and open an issue at: https://github.com/TimDettmers/bitsandbytes/issues

0.43.2
(flux) [wangxi@v100-4 bitsandbytes]$

Expected behavior

In the case of a manual override, make sure you set LD_LIBRARY_PATH, e.g.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-11.2,

  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/lib64/libcudart.so.12
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/lib64/libcudart.so.12.4.99
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/lib64/libcudart.so
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/lib64/libcudart.so.12
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/lib64/libcudart.so.12.4.99
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/lib64/libcudart.so
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/lib64/libcudart.so.12
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/lib64/libcudart.so.12.4.99
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/lib64/libcudart.so
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/lib64/libcudart.so.12
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/lib64/libcudart.so.12.4.99
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/lib64/libcudart.so
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/lib64/libcudart.so.12
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/lib64/libcudart.so.12.4.99
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/lib64/libcudart.so
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/lib64/libcudart.so.12
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/lib64/libcudart.so.12.4.99
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/lib64/libcudart.so
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib/libcudart.so.12
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib/libcudart.so.12.4.99
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib/libcudart.so
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib/libcudart.so.12
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib/libcudart.so.12.4.99
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib/libcudart.so
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib/libcudart.so.12
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib/libcudart.so.12.4.99
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib/libcudart.so
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib/libcudart.so.12
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib/libcudart.so.12.4.99
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib/libcudart.so
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib/libcudart.so.12
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib/libcudart.so.12.4.99
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib/libcudart.so
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib/libcudart.so.12
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib/libcudart.so.12.4.99
  • Found CUDA runtime at: /mnt/data/wangxi/cuda-12.4/targets/x86_64-linux/lib/libcudart.so
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    ++++++++++++++++++++++ DEBUG INFO END ++++++++++++++++++++++
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Checking that the library is importable and CUDA is callable...
    Couldn't load the bitsandbytes library, likely due to missing binaries.
    Please ensure bitsandbytes is properly installed.

For source installations, compile the binaries with cmake -DCOMPUTE_BACKEND=cuda -S ..
See the documentation for more details if needed.

Trying a simple check anyway, but this will likely fail...
Traceback (most recent call last):
File "/home/wangxi/bitsandbytes/bitsandbytes/diagnostics/main.py", line 66, in main
sanity_check()
File "/home/wangxi/bitsandbytes/bitsandbytes/diagnostics/main.py", line 40, in sanity_check
adam.step()
File "/home/wangxi/miniconda3/envs/flux/lib/python3.10/site-packages/torch/optim/optimizer.py", line 484, in wrapper
out = func(*args, **kwargs)
File "/home/wangxi/miniconda3/envs/flux/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/home/wangxi/bitsandbytes/bitsandbytes/optim/optimizer.py", line 287, in step
self.update_step(group, p, gindex, pindex)
File "/home/wangxi/miniconda3/envs/flux/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
File "/home/wangxi/bitsandbytes/bitsandbytes/optim/optimizer.py", line 500, in update_step
F.optimizer_update_32bit(
File "/home/wangxi/bitsandbytes/bitsandbytes/functional.py", line 1588, in optimizer_update_32bit
optim_func = str2optimizer32bit[optimizer_name][0]
NameError: name 'str2optimizer32bit' is not defined
Above we output some debug information.
Please provide this info when creating an issue via https://github.com/TimDettmers/bitsandbytes/issues/new/choose
WARNING: Please be sure to sanitize sensitive info from the output before posting it.
(flux) [wangxi@v100-4 bitsandbytes]$

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions