Comments (4)
I'm having the same issue
root@1c1b2c566ff1:/workspace/ilya_png# python -m bitsandbytes
Could not find the bitsandbytes CUDA binary at PosixPath('/usr/local/lib/python3.10/dist-packages/bitsandbytes-0.43.2.dev0-py3.10-linux-x86_64.egg/bitsandbytes/libbitsandbytes_cuda121.so')
Could not load bitsandbytes native library: /usr/local/lib/python3.10/dist-packages/bitsandbytes-0.43.2.dev0-py3.10-linux-x86_64.egg/bitsandbytes/libbitsandbytes_cpu.so: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes-0.43.2.dev0-py3.10-linux-x86_64.egg/bitsandbytes/cextension.py", line 109, in <module>
lib = get_native_library()
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes-0.43.2.dev0-py3.10-linux-x86_64.egg/bitsandbytes/cextension.py", line 96, in get_native_library
dll = ct.cdll.LoadLibrary(str(binary_path))
File "/usr/lib/python3.10/ctypes/__init__.py", line 452, in LoadLibrary
return self._dlltype(name)
File "/usr/lib/python3.10/ctypes/__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /usr/local/lib/python3.10/dist-packages/bitsandbytes-0.43.2.dev0-py3.10-linux-x86_64.egg/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
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++ BUG REPORT INFORMATION ++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++ OTHER +++++++++++++++++++++++++++
CUDA specs: CUDASpecs(highest_compute_capability=(8, 9), cuda_version_string='121', cuda_version_tuple=(12, 1))
PyTorch settings found: CUDA_VERSION=121, Highest Compute Capability: (8, 9).
Library not found: /usr/local/lib/python3.10/dist-packages/bitsandbytes-0.43.2.dev0-py3.10-linux-x86_64.egg/bitsandbytes/libbitsandbytes_cuda121.so. Maybe you need to compile it from source?
If you compiled from source, try again with `make CUDA_VERSION=DETECTED_CUDA_VERSION`,
for example, `make CUDA_VERSION=113`.
The CUDA version for the compile might depend on your conda install, if using conda.
Inspect CUDA version via `conda list | grep cuda`.
To manually override the PyTorch CUDA version please see: https://github.com/TimDettmers/bitsandbytes/blob/main/docs/source/nonpytorchcuda.mdx
CUDA SETUP: WARNING! CUDA runtime files not found in any environmental path.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++ 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 "/usr/local/lib/python3.10/dist-packages/bitsandbytes-0.43.2.dev0-py3.10-linux-x86_64.egg/bitsandbytes/diagnostics/main.py", line 66, in main
sanity_check()
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes-0.43.2.dev0-py3.10-linux-x86_64.egg/bitsandbytes/diagnostics/main.py", line 40, in sanity_check
adam.step()
File "/usr/local/lib/python3.10/dist-packages/torch/optim/optimizer.py", line 385, in wrapper
out = func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes-0.43.2.dev0-py3.10-linux-x86_64.egg/bitsandbytes/optim/optimizer.py", line 287, in step
self.update_step(group, p, gindex, pindex)
File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes-0.43.2.dev0-py3.10-linux-x86_64.egg/bitsandbytes/optim/optimizer.py", line 496, in update_step
F.optimizer_update_32bit(
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes-0.43.2.dev0-py3.10-linux-x86_64.egg/bitsandbytes/functional.py", line 1584, 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.
And standalone:
root@1c1b2c566ff1:/workspace/ilya_png# python
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import bitsandbytes
Could not find the bitsandbytes CUDA binary at PosixPath('/usr/local/lib/python3.10/dist-packages/bitsandbytes-0.43.2.dev0-py3.10-linux-x86_64.egg/bitsandbytes/libbitsandbytes_cuda121.so')
Could not load bitsandbytes native library: /usr/local/lib/python3.10/dist-packages/bitsandbytes-0.43.2.dev0-py3.10-linux-x86_64.egg/bitsandbytes/libbitsandbytes_cpu.so: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes-0.43.2.dev0-py3.10-linux-x86_64.egg/bitsandbytes/cextension.py", line 109, in <module>
lib = get_native_library()
File "/usr/local/lib/python3.10/dist-packages/bitsandbytes-0.43.2.dev0-py3.10-linux-x86_64.egg/bitsandbytes/cextension.py", line 96, in get_native_library
dll = ct.cdll.LoadLibrary(str(binary_path))
File "/usr/lib/python3.10/ctypes/__init__.py", line 452, in LoadLibrary
return self._dlltype(name)
File "/usr/lib/python3.10/ctypes/__init__.py", line 374, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /usr/local/lib/python3.10/dist-packages/bitsandbytes-0.43.2.dev0-py3.10-linux-x86_64.egg/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
Python 3.10.12
Ubuntu 22.04
CUDA 12.2
PyTorch 2.2
GPU: NVIDIA A6000 Ada Generation (48Gb)
Installed with:
git clone https://github.com/TimDettmers/bitsandbytes.git
cd bitsandbytes
CUDA_VERSION=118 make cuda11x
python setup.py install
Perhaps, I should've picked different CUDA_VERSION
from bitsandbytes.
@NavinKumarMNK Given your GPU compute capability (7.0) you'll want to compile with -DNO_CUBLASLT
. I'm curious to know if this works on ppc64le after that adjustment!
@shigabeev It looks like you're trying to run from source too, but the instructions have changed now to use CMake. See here: https://huggingface.co/docs/bitsandbytes/main/en/installation#compile-from-source
You should be using the same CUDA version as PyTorch (in your case, 12.1) or otherwise set BNB_CUDA_VERSION
to match the version of the toolkit you're using to build with (i.e. export BNB_CUDA_VERSION=122
)
from bitsandbytes.
[ 14%] Building CXX object CMakeFiles/bitsandbytes.dir/csrc/common.cpp.o
In file included from /root/bitsandbytes/include/AAlloc.h:3,
from /root/bitsandbytes/include/BinSearch.h:3,
from /root/bitsandbytes/csrc/common.h:1,
from /root/bitsandbytes/csrc/common.cpp:1:
/root/bitsandbytes/include/Portable.h:35:2: error: #error Compiler must support SSE2
35 | #error Compiler must support SSE2
| ^~~~~
In file included from /root/bitsandbytes/include/SIMD.h:6,
from /root/bitsandbytes/include/BinSearch.h:5,
from /root/bitsandbytes/csrc/common.h:1,
from /root/bitsandbytes/csrc/common.cpp:1:
/usr/lib/gcc/powerpc64le-linux-gnu/11/include/emmintrin.h:56:2: error: #error "Please read comment above. Use -DNO_WARN_X86_INTRINSICS to disable this error."
56 | #error "Please read comment above. Use -DNO_WARN_X86_INTRINSICS to disable this error."
| ^~~~~
In file included from /usr/lib/gcc/powerpc64le-linux-gnu/11/include/emmintrin.h:66,
from /root/bitsandbytes/include/SIMD.h:6,
from /root/bitsandbytes/include/BinSearch.h:5,
from /root/bitsandbytes/csrc/common.h:1,
from /root/bitsandbytes/csrc/common.cpp:1:
/usr/lib/gcc/powerpc64le-linux-gnu/11/include/xmmintrin.h:54:2: error: #error "Please read comment above. Use -DNO_WARN_X86_INTRINSICS to disable this error."
54 | #error "Please read comment above. Use -DNO_WARN_X86_INTRINSICS to disable this error."
| ^~~~~
In file included from /usr/lib/gcc/powerpc64le-linux-gnu/11/include/xmmintrin.h:79,
from /usr/lib/gcc/powerpc64le-linux-gnu/11/include/emmintrin.h:66,
from /root/bitsandbytes/include/SIMD.h:6,
from /root/bitsandbytes/include/BinSearch.h:5,
from /root/bitsandbytes/csrc/common.h:1,
from /root/bitsandbytes/csrc/common.cpp:1:
/usr/lib/gcc/powerpc64le-linux-gnu/11/include/mmintrin.h:52:2: error: #error "Please read comment above. Use -DNO_WARN_X86_INTRINSICS to disable this error."
52 | #error "Please read comment above. Use -DNO_WARN_X86_INTRINSICS to disable this error."
| ^~~~~
make[2]: *** [CMakeFiles/bitsandbytes.dir/build.make:76: CMakeFiles/bitsandbytes.dir/csrc/common.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/bitsandbytes.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
i get this error when i build from source
from bitsandbytes.
Same issue... Sad
from bitsandbytes.
Related Issues (20)
- CONTRIBUTING.md references Meta CLA HOT 1
- bitsandbytes import error in colab HOT 1
- Could not run Kohya
- PicklingError: Can't pickle <function Embedding.forward at XXXXXXX> it's not the same object as torch.nn.modules.sparse.Embedding.forward
- AttributeError: 'NoneType' object has no attribute 'split' CUDA Setup failed despite CUDA being available.
- Mistral-v0.1 nf4 is not quantized into 4bit HOT 1
- RuntimeError: CUDA Setup failed despite GPU being available. Please run the following command to get more information: HOT 3
- problem with loading my finetuned Llama2 model - type object 'Params4bit' has no attribute 'from_prequantized' HOT 3
- undefined symbol: cdequantize_blockwise_fp32 HOT 1
- AnimateDiff SDXL won't run
- AttributeError: 'NoneType' object has no attribute 'cquantize_blockwise_fp16_nf4' HOT 5
- Could not load bitsandbytes native library: 'NoneType' object has no attribute 'split' HOT 1
- ImportError: Using `bitsandbytes` 8-bit quantization requires Accelerate: `pip install accelerate` and the latest version of bitsandbytes: `pip install -i https://pypi.org/simple/ bitsandbytes`
- RuntimeError: Something when wrong when trying to find file. Maybe you do not have a linux system? HOT 1
- Error in Windows HOT 2
- please provide python whel package in nvidia jetson agx orin (aarch64 + cuda) HOT 1
- Exact version match required between the system and PyTorch CUDA libraries for the compilation to succeed HOT 1
- Error invalid device ordinal at line 359 in file /opt/bitsandbytes/csrc/pythonInterface.c
- Request for AdamW8bit support on CPU (would help TorchTune) HOT 5
- 8bit CAME optimizer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitsandbytes.