Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: libcublas.so.11: cannot open shared object file: No such file or directory #60

Closed
xyxxmb opened this issue Oct 12, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@xyxxmb
Copy link

xyxxmb commented Oct 12, 2022

My environment is:
linux system:centos7
cuda: 10.2
torch:1.11.0
bitsandbytes:0.34.0

Then the error is:

import bitsandbytes as bnb

===================================BUG REPORT===================================
Welcome to bitsandbytes. For bug reports, please submit your error trace to: https://github.com/TimDettmers/bitsandbytes/issues
For effortless bug reporting copy-paste your error into this form: https://docs.google.com/forms/d/e/1FAIpQLScPB8emS3Thkp66nvqwmjTEgxp8Y9ufuWTzFyr9kJ5AoI47dQ/viewform?usp=sf_link
================================================================================
/xxx/anaconda3/lib/python3.8/site-packages/bitsandbytes/cuda_setup/paths.py:86: UserWarning: /xxx/anaconda3 did not contain libcudart.so as expected! Searching further paths...
  warn(
/xxx/anaconda3/lib/python3.8/site-packages/bitsandbytes/cuda_setup/paths.py:20: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {PosixPath('printf "\\033]0;%s@%s'), PosixPath('%s\\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}";/etc/sysconfig/bash-prompt-history')}
  warn(
CUDA_SETUP: WARNING! libcudart.so not found in any environmental path. Searching /usr/local/cuda/lib64...
CUDA SETUP: CUDA runtime path found: /usr/local/cuda/lib64/libcudart.so
CUDA SETUP: Highest compute capability among GPUs detected: 7.0
CUDA SETUP: CUDA version lower than 11 are currenlty not supported for LLM.int8(). You will be only to use 8-bit optimizers and quantization routines!!
CUDA SETUP: Detected CUDA version 102
CUDA SETUP: Loading binary /xxx/anaconda3/lib/python3.8/site-packages/bitsandbytes/libbitsandbytes_cuda102_nocublaslt.so...
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-1-b6686ac3a796> in <module>
----> 1 import bitsandbytes as bnb

~/xxx/anaconda3/lib/python3.8/site-packages/bitsandbytes/__init__.py in <module>
      4 # LICENSE file in the root directory of this source tree.
      5
----> 6 from .autograd._functions import (
      7     MatmulLtState,
      8     bmm_cublas,

~/xxx/anaconda3/lib/python3.8/site-packages/bitsandbytes/autograd/_functions.py in <module>
      3
      4 import torch
----> 5 import bitsandbytes.functional as F
      6
      7 from dataclasses import dataclass

~/xxx/anaconda3/lib/python3.8/site-packages/bitsandbytes/functional.py in <module>
     11 from torch import Tensor
     12
---> 13 from .cextension import COMPILED_WITH_CUDA, lib
     14 from functools import reduce  # Required in Python 3
     15

~/xxx/anaconda3/lib/python3.8/site-packages/bitsandbytes/cextension.py in <module>
     39
     40
---> 41 lib = CUDALibrary_Singleton.get_instance().lib
     42 try:
     43     lib.cadam32bit_g32

~/xxx/anaconda3/lib/python3.8/site-packages/bitsandbytes/cextension.py in get_instance(cls)
     35         if cls._instance is None:
     36             cls._instance = cls.__new__(cls)
---> 37             cls._instance.initialize()
     38         return cls._instance
     39

~/xxx/anaconda3/lib/python3.8/site-packages/bitsandbytes/cextension.py in initialize(self)
     29         else:
     30             print(f"CUDA SETUP: Loading binary {binary_path}...")
---> 31             self.lib = ct.cdll.LoadLibrary(binary_path)
     32
     33     @classmethod

~/xxx/anaconda3/lib/python3.8/ctypes/__init__.py in LoadLibrary(self, name)
    457
    458     def LoadLibrary(self, name):
--> 459         return self._dlltype(name)
    460
    461 cdll = LibraryLoader(CDLL)

~/xxx/anaconda3/lib/python3.8/ctypes/__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error, winmode)
    379
    380         if handle is None:
--> 381             self._handle = _dlopen(self._name, mode)
    382         else:
    383             self._handle = handle

OSError: libcublas.so.11: cannot open shared object file: No such file or directory

I can not update the cuda version into 11.x. How should I solve the issue?

@B-Soul
Copy link

B-Soul commented Oct 21, 2022

I have the same problem.

@TimDettmers TimDettmers added the enhancement New feature or request label Oct 27, 2022
@TimDettmers
Copy link
Owner

Support for LLM.int8() for GPUs with compute capabilities below 7.5 will be added at a later date. Thanks for the issue!

@xiao2mo
Copy link

xiao2mo commented Mar 20, 2023

Any update??? I have the same problem. @TimDettmers

@swumagic
Copy link

Bitsandbytes was not supported windows before, but my method can support windows.(yuhuang)
1 open folder J:\StableDiffusion\sdwebui,Click the address bar of the folder and enter CMD
or WIN+R, CMD 。enter,cd /d J:\StableDiffusion\sdwebui
2 J:\StableDiffusion\sdwebui\py310\python.exe -m pip uninstall bitsandbytes

3 J:\StableDiffusion\sdwebui\py310\python.exe -m pip uninstall bitsandbytes-windows

4 J:\StableDiffusion\sdwebui\py310\python.exe -m pip install https://github.com/jllllll/bitsandbytes-windows-webui/releases/download/wheels/bitsandbytes-0.41.1-py3-none-win_amd64.whl

Replace your SD venv directory file(python.exe Folder) here(J:\StableDiffusion\sdwebui\py310)

Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants