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

CUDA Setup failed despite GPU being available. #512

Closed
TS10armourer opened this issue Jun 12, 2023 · 10 comments
Closed

CUDA Setup failed despite GPU being available. #512

TS10armourer opened this issue Jun 12, 2023 · 10 comments
Labels
bug Something isn't working CUDA Setup low priority (will be worked on after all priority issues)

Comments

@TS10armourer
Copy link

But I ran the following code check and there was no problem
image
After running 'Python - m bitsandbytes', the information is as follows
(AI002) C:\Users\Administrator>python -m bitsandbytes

===================================BUG REPORT===================================
Welcome to bitsandbytes. For bug reports, please run

python -m bitsandbytes

and submit this information together with your error trace to: https:/TimDettmers/bitsandbytes/issues

bin E:\Miniconda3\envs\AI002\lib\site-packages\bitsandbytes\libbitsandbytes_cpu.so
E:\Miniconda3\envs\AI002\lib\site-packages\bitsandbytes\cuda_setup\main.py:145: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {WindowsPath('E'), WindowsPath('/Miniconda3/envs/AI002/lib')}
warn(msg)
E:\Miniconda3\envs\AI002\lib\site-packages\bitsandbytes\cuda_setup\main.py:145: UserWarning: E:\Miniconda3\envs\AI002 did not contain ['libcudart.so', 'libcudart.so.11.0', 'libcudart.so.12.0'] as expected! Searching further paths...
warn(msg)
CUDA_SETUP: WARNING! libcudart.so not found in any environmental path. Searching in backup paths...
E:\Miniconda3\envs\AI002\lib\site-packages\bitsandbytes\cuda_setup\main.py:145: UserWarning: WARNING: The following directories listed in your path were found to be non-existent: {WindowsPath('/usr/local/cuda/lib64')}
warn(msg)
CUDA SETUP: WARNING! libcuda.so not found! Do you have a CUDA driver installed? If you are on a cluster, make sure you are on a CUDA machine!
E:\Miniconda3\envs\AI002\lib\site-packages\bitsandbytes\cuda_setup\main.py:145: UserWarning: WARNING: No libcudart.so found! Install CUDA or the cudatoolkit package (anaconda)!
warn(msg)
E:\Miniconda3\envs\AI002\lib\site-packages\bitsandbytes\cuda_setup\main.py:145: UserWarning: WARNING: No GPU detected! Check your CUDA paths. Proceeding to load CPU-only library...
warn(msg)
CUDA SETUP: Loading binary E:\Miniconda3\envs\AI002\lib\site-packages\bitsandbytes\libbitsandbytes_cpu.so...
argument of type 'WindowsPath' is not iterable
CUDA SETUP: Problem: The main issue seems to be that the main CUDA library was not detected.
CUDA SETUP: Solution 1): Your paths are probably not up-to-date. You can update them via: sudo ldconfig.
CUDA SETUP: Solution 2): If you do not have sudo rights, you can do the following:
CUDA SETUP: Solution 2a): Find the cuda library via: find / -name libcuda.so 2>/dev/null
CUDA SETUP: Solution 2b): Once the library is found add it to the LD_LIBRARY_PATH: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:FOUND_PATH_FROM_2a
CUDA SETUP: Solution 2c): For a permanent solution add the export from 2b into your .bashrc file, located at ~/.bashrc
Traceback (most recent call last):
File "E:\Miniconda3\envs\AI002\lib\runpy.py", line 185, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, Error)
File "E:\Miniconda3\envs\AI002\lib\runpy.py", line 144, in get_module_details
return get_module_details(pkg_main_name, error)
File "E:\Miniconda3\envs\AI002\lib\runpy.py", line 111, in get_module_details
import(pkg_name)
File "E:\Miniconda3\envs\AI002\lib\site-packages\bitsandbytes_init
.py", line 6, in
from . import cuda_setup, utils, research
File "E:\Miniconda3\envs\AI002\lib\site-packages\bitsandbytes\research_init
.py", line 1, in
from . import nn
File "E:\Miniconda3\envs\AI002\lib\site-packages\bitsandbytes\research\nn_init.py", line 1, in
from .modules import LinearFP8Mixed, LinearFP8Global
File "E:\Miniconda3\envs\AI002\lib\site-packages\bitsandbytes\research\nn\modules.py", line 8, in
from bitsandbytes.optim import GlobalOptimManager
File "E:\Miniconda3\envs\AI002\lib\site-packages\bitsandbytes\optim_init.py", line 6, in
from bitsandbytes.cextension import COMPILED_WITH_CUDA
File "E:\Miniconda3\envs\AI002\lib\site-packages\bitsandbytes\cextension.py", line 20, in
raise RuntimeError('''
RuntimeError:
CUDA Setup failed despite GPU 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:/TimDettmers/bitsandbytes/issues
@sunbeibei-hub
Copy link

楼主解决没

@sunbeibei-hub
Copy link

遇到同样的问题

@vootox
Copy link

vootox commented Jun 28, 2023

Same issue

@krishnareddyML
Copy link

any update on above issue, I have also got the same issue in windows

@RyanDivigalpitiya
Copy link

I also have the same issue (am on windows)

@wzwtime
Copy link

wzwtime commented Jul 7, 2023

same issue

@wzwtime
Copy link

wzwtime commented Jul 13, 2023

cuda use 11.8 not 12.1
bitsandbytes use pip install https:/jllllll/bitsandbytes-windows-webui/releases/download/wheels/bitsandbytes-0.39.1-py3-none-win_amd64.whl

@TimDettmers TimDettmers added bug Something isn't working low priority (will be worked on after all priority issues) CUDA Setup labels Jul 15, 2023
@TimDettmers
Copy link
Collaborator

This issue might be resolve by upgrading via pip install -U bitsandbytes. However, note that Windows is currently not supported. You can find more information here: #30

@chwshuang
Copy link

in my window10:
git clone https:/Vision-CAIR/MiniGPT-4.git
cd MiniGPT-4
conda env create -f environment.yml
conda activate minigpt4
pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 torchaudio==0.13.1 --extra-index-url https://download.pytorch.org/whl/cu117
pip uninstall bitsandbytes
pip install https:/jllllll/bitsandbytes-windows-webui/releases/download/wheels/bitsandbytes-0.39.1-py3-none-win_amd64.whl

run python demo.py --cfg-path eval_configs/minigpt4_eval.yaml --gpu-id 0

@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:/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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CUDA Setup low priority (will be worked on after all priority issues)
Projects
None yet
Development

No branches or pull requests

9 participants