broncotc / bitsandbytes-rocm

MIT License
37 stars 14 forks source link

CUDA Setup failed despite GPU being available (RX 6900XT) #2

Closed Jarfeh closed 1 year ago

Jarfeh commented 1 year ago
CUDA SETUP: Setup Failed!
CUDA SETUP: Setup Failed!
CUDA SETUP: Something unexpected happened. Please compile from source:
git clone git@github.com:TimDettmers/bitsandbytes.git
cd bitsandbytes
<make_cmd here, commented out>
python setup.py install
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 187, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.10/runpy.py", line 146, in _get_module_details
    return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.10/runpy.py", line 110, in _get_module_details
    __import__(pkg_name)
  File "/dockerx/kohya_ss/venv/lib/python3.10/site-packages/bitsandbytes-0.35.4-py3.10.egg/bitsandbytes/__init__.py", line 6, in <module>
    from .autograd._functions import (
  File "/dockerx/kohya_ss/venv/lib/python3.10/site-packages/bitsandbytes-0.35.4-py3.10.egg/bitsandbytes/autograd/_functions.py", line 5, in <module>
    import bitsandbytes.functional as F
  File "/dockerx/kohya_ss/venv/lib/python3.10/site-packages/bitsandbytes-0.35.4-py3.10.egg/bitsandbytes/functional.py", line 15, in <module>
    from .cextension import COMPILED_WITH_CUDA, lib
  File "/dockerx/kohya_ss/venv/lib/python3.10/site-packages/bitsandbytes-0.35.4-py3.10.egg/bitsandbytes/cextension.py", line 67, in <module>
    raise RuntimeError('''
RuntimeError: 
        CUDA Setup failed despite GPU being available. Inspect the CUDA SETUP outputs aboveto fix your environment!
        If you cannot find any issues and suspect a bug, please open an issue with detals about your environment:
        https://github.com/TimDettmers/bitsandbytes/issues
broncotc commented 1 year ago

Hi Jarfeh,

Can you paste the log from installing this package? It seems like the python side can't find the compiled native libraries.

gururise commented 1 year ago

@Jarfeh Try this.

make hip

check the makefile to ensure you are importing the correct rocm library version.

Jarfeh commented 1 year ago

@Jarfeh Try this.

make hip

check the makefile to ensure you are importing the correct rocm library version.

Looking through the makefile I came to the conclusion myself that would work, thank you for letting me know though :)

make hip and then using CUDA_VERSION=gfx1035 python setup.py install let me install it properly