Open tejarao1156 opened 5 months ago
Same error I am also getting, can anyone suggest a way for this?
I had this issue while trying to get Kohya_ss setup and managed to solve it.
My system has cuda toolkit version 12.2.
NVIDIA-SMI 535.161.07 Driver Version: 535.161.07 CUDA Version: 12.2
. If you have a lower driver version (i.e. ~320 with cuda 11.8) it should work just by installing bitsandbytes with pip
. But I could not downgrade my driver version and the default installation of bitsandbytes does not seem to work with cuda 12.2.
So I managed to fix it with the help of https://github.com/TimDettmers/bitsandbytes/issues/551#issuecomment-1621292363
I did have to do a few extra steps.
Basically made sure to uninstall bitsandbytes
and bitsandbytes_windows
from my venv environment and build it from source (as shown in the link above).
Since I had cuda 12.2, I had to specify the cuda version in the build process (refer to link) as CUDA_VERSION=122 make cuda12x
With this i generated a file libbitsandbytes_cuda122.so
. This file I had to copy it to the venv python library path for bitsandbytes .
Also, on the venv, I had to set environment variables with commands export BNB_CUDA_VERSION=122
and export LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda-12.2/targets/x86_64-linux/lib/stubs
(Note that this is because I have cuda 12.2)
Finallly after running python -m bitsandbytes
, I did not get any more errors and got a Installation was successful!
.
@tejarao1156 and @s-ravi18 did the above advice help you? if so please say (or clarify any additions) so that this issue could be closed.
System Info
GOOGLE COLLAB PRO V100 GPU
Reproduction
Expected behavior
CODE EXECUTION