-
Notifications
You must be signed in to change notification settings - Fork 961
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
Invalid device function on ROCm #1008
Comments
you need to specify your gpu architecture while building. see llama.cpp readme, unde hipblas it tells you how to select your specific gpu architecture |
Tried that already, doesn't work. I ran
|
try this: |
i have the same issue. i thought it's just that my gpu isn't supported. |
I notice this happens only when I give it a prompt that is too long. Happens in both chat and the default/notebook when the prompt is too long. Very weird actually |
does this happen with regular llama.cpp? |
I get normal working results when I set the context size to anything <32768! |
i think this is a bug in llama.cpp itself. i made an issue there. |
@SuperPou1 is this still an issue with the latest release, I saw a few HIPBLAS / ROCm related fix commits recently in llama.cpp |
I don't think this still happens. I was able to compile and run now. |
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Expected Behavior
I tried to compile
llama-cpp-python
to run on my local machine, which has an RX 7900 XTX in it and runs Arch Linux. I have installed (to the best of my knowledge) all of the required packages for compiling this software. In the past, I've ran Oobabooga's default setup (using pyenv instead of Conda) using ROCm based GPU acceleration (verified, it does use ROCm hipBLAS and not OpenCL CLBLAS, it says so in the logs). This still works now, but I wanted to compile the package myself so I could use the latest version supporting Mixtral. That's when I discovered it doesn't work.I expected the package to just compile, install and run without issues.
Current Behavior
I compile the package according to the instructions in the README, running
CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python
and also settingCC=/opt/rocm/llvm/bin/clang
andCXX=/opt/rocm/llvm/bin/clang++
to compile and install it. Then run it using Oobabooga's software, it doesn't work. Neither Mixtral nor any other gguf model works at that point.What happens is that the webui starts and when I try to load a model using llama.cpp it works, even offloading some layers to the GPU works. However, when I try to generate anything I get the following error:
I am pretty sure that last line can be ignored, as it doesn't always show up and I believe isn't related to this project, however what concerns me more is the line before that.
I have tried to compile both the latest v0.2.23 version as well as the version currently used by Oobabooga, v0.2.19. Both result in exactly the same error about
invalid device function
.Environment and Context
Sorry, I am remote right now and rebooted, but it's not coming back up. I will add a fully detailed spec list later, but I will add as much as I can right now.
CPU
Arch Linux. Kernel version 6.6.6 (Maybe the devil is my issue 😆)
Failure Information (for bugs)
Fails quite spectacularly sometimes. Doesn't always happen, but sometimes the screen of the PC will flash black for a minute and
nvtop
will keep reporting 100% GPU usage forever until a reboot is issued. This also breaks any future runs until a reboot is done.Steps to Reproduce
pip uninstall llama-cpp-python
andpip uninstall llama-cpp-python-cuda
to uninstall the versions that came with Ooba.CC="/opt/rocm/llvm/bin/clang" CXX="/opt/rocm/llvm/bin/clang++" CMAKE_ARGS="-DLLAMA_HIPBLAS=on" pip install llama-cpp-python
to install the latest version or install v0.2.19, which verified works on Ooba.It should be noted that this exact thing also happens with the original llama.cpp program, but this one breaks my computer way less. llama.cpp always messes up the entire GPU driver, preventing even just loading any of models until a reboot is issued.
Failure Logs
Already provides above.
The text was updated successfully, but these errors were encountered: