Skip to content

Fallback to Vulkan for whisper.cpp in case of hipblas builds. #4904

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

Open
TimoStolz opened this issue Feb 25, 2025 · 1 comment
Open

Fallback to Vulkan for whisper.cpp in case of hipblas builds. #4904

TimoStolz opened this issue Feb 25, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@TimoStolz
Copy link

Is your feature request related to a problem? Please describe.
When using a hipblas build, I'm always frustrated that whisper.cpp is using my CPU instead of my GPU. Unfortunately, whisper.cpp does not support ROCm or hipblas.

Describe the solution you'd like
However, my AMD GPU does not only support ROCm/hipblas, but also Vulkan. Just like whisper.cpp.

Describe alternatives you've considered
At the moment, I'm using a full Vulkan build to be compatible with whisper.cpp. However, I'd prefer to use ROCm when available, else fallback to Vulkan.

@TimoStolz TimoStolz added the enhancement New feature or request label Feb 25, 2025
@zierf
Copy link

zierf commented Apr 13, 2025

Technically, whisper.cpp supports ROCm. I recently changed my hardware, but before that I was able to use it directly (without a wrapper like LocalAI) with an RX 6900XT on NixOS.

I remember it didn't work right away; I was also using a Vulkan build for some time. Meanwhile, the maintainers have been making some changes, and after that, whisper.cpp started using ROCm as intended, which was evident both in the logs and in the speed.

While searching for the cause and solution, I stumbled across a change in a build variable from LLAMA_HIPBLAS to GGML_HIPBLAS, perhaps that is the problem here as well.

At least I could only find one commit with LLAMA_HIPBLAS in this repository, but none with GGML_HIPBLAS.

Here for comparison the build for the Nix package with GGML_HIPBLAS enabled and properly set rocmPackages dependencies as well as using hipcc compiler, when rocmSupport is enabled.

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

2 participants