ggerganov / whisper.cpp

Port of OpenAI's Whisper model in C/C++
MIT License
35.38k stars 3.61k forks source link

cmake option `GGML_OPENBLAS` not working #2508

Closed ddennedy closed 1 day ago

ddennedy commented 1 week ago

Running cmake with -DGGML_OPENBLAS raises a CMake warning "Manually-specified variables were not used by the project: GGML_OPENBLAS" and indeed it does not build with OpenBLAS as reported at runtime with the main example.

You can see it in the latest CI workflow build log.

I see in ggml/CMakeLists.txt option(GGML_BLAS.... I will try that and report back.

...No, cmake find_package is not working, which does not surprise me. This is why the msys2 PKGBUILD uses good-old reliable pkg-config:

CFLAGS+=" $(pkgconf.exe --cflags openblas)" \
...
      -DBLAS_LIBRARIES="`pkgconf --libs-only-l openblas`" \
      -DBLAS_INCLUDE_DIRS="`pkgconf --cflags-only-I openblas`" \
ddennedy commented 1 week ago

Well, the above from msys2 PKGBUILD is not working either, and neither of their patches addresses it. I finally got it to work with this -DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS

main.exe output now shows:

whisper_backend_init: using BLAS backend