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

OpenBLAS v0.3.27 crashing where v0.3.26 doesn't (Windows) #2074

Open
royshil opened this issue Apr 17, 2024 · 3 comments
Open

OpenBLAS v0.3.27 crashing where v0.3.26 doesn't (Windows) #2074

royshil opened this issue Apr 17, 2024 · 3 comments

Comments

@royshil
Copy link

royshil commented Apr 17, 2024

The latest OpenBLAS version v0.3.27 released 2 weeks ago is causing a crash on whisper_full().
https://github.com/OpenMathLib/OpenBLAS/releases/tag/v0.3.27

I verified that v0.3.26 (which ive been using so far) doesn't crash.

CPU Name: Intel(R) Core(TM) i7-8700T CPU @ 2.40GHz
Windows Version: 10.0 Build 22631 (release: 23H2; revision: 3447; 64-bit)

Whisper system print: AVX = 1 | AVX2 = 1 | AVX512 = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | METAL = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 1 | SSSE3 = 0 | VSX = 0 | CUDA = 0 | COREML = 0 | OPENVINO = 0

Any clues appreciated!

(this is for https://github.com/occ-ai/obs-localvocal e.g. Whisper for OBS)

@tamo
Copy link
Contributor

tamo commented Apr 21, 2024

I have no problems with OpenBLAS 0.3.27.
Maybe the libopenblas.dll you are using is still 0.3.26?
Try copying libopenblas.dll from 0.3.27 to the directory of the binaries.

cd C:\whisper.cpp
Invoke-WebRequest https://github.com/OpenMathLib/OpenBLAS/releases/download/v0.3.27/OpenBLAS-0.3.27-x64-64.zip -OutFile .\openblas.zip
Expand-Archive .\openblas.zip -DestinationPath .\openblas
$env:OPENBLAS_PATH = "C:\whisper.cpp\openblas"
cmake -B build -DWHISPER_OPENBLAS=ON -DWHISPER_OPENBLAS_INTERFACE64=ON
...
cmake --build build -j --config Release
...
copy .\openblas\bin\libopenblas.dll .\build\bin\Release\ # <==== COPY THE DLL FILE
.\build\bin\Release\main.exe -m .\ggml-model-whisper-medium.bin -f .\samples\jfk.wav

whisper_init_from_file_with_params_no_state: loading model from '.\ggml-model-whisper-medium.bin'
whisper_model_load: loading model
whisper_model_load: n_vocab       = 51865
whisper_model_load: n_audio_ctx   = 1500
whisper_model_load: n_audio_state = 1024
whisper_model_load: n_audio_head  = 16
whisper_model_load: n_audio_layer = 24
whisper_model_load: n_text_ctx    = 448
whisper_model_load: n_text_state  = 1024
whisper_model_load: n_text_head   = 16
whisper_model_load: n_text_layer  = 24
whisper_model_load: n_mels        = 80
whisper_model_load: ftype         = 1
whisper_model_load: qntvr         = 0
whisper_model_load: type          = 4 (medium)
whisper_model_load: adding 1608 extra tokens
whisper_model_load: n_langs       = 99
whisper_model_load:      CPU total size =  1533.14 MB
whisper_model_load: model size    = 1533.14 MB
whisper_init_state: kv self size  =  132.12 MB
whisper_init_state: kv cross size =  147.46 MB
whisper_init_state: compute buffer (conv)   =   28.68 MB
whisper_init_state: compute buffer (encode) =  594.22 MB
whisper_init_state: compute buffer (cross)  =    7.85 MB
whisper_init_state: compute buffer (decode) =  138.87 MB

system_info: n_threads = 4 / 8 | AVX = 1 | AVX2 = 1 | AVX512 = 0 | FMA = 1 | NEON = 0 | ARM_FMA = 0 | METAL = 0 | F16C = 1 | FP16_VA = 0 | WASM_SIMD = 0 | BLAS = 1 | SSE3 = 1 | SSSE3 = 0 | VSX = 0 | CUDA = 0 | COREML = 0 | OPENVINO = 0

main: processing '.\samples\jfk.wav' (176000 samples, 11.0 sec), 4 threads, 1 processors, 5 beams + best of 5, lang = en, task = transcribe, timestamps = 1 ...


[00:00:00.000 --> 00:00:11.000]   And so my fellow Americans, ask not what your country can do for you, ask what you can do for your country.

@royshil
Copy link
Author

royshil commented Apr 22, 2024

@tamo Thanks for testing
Strangely enough they have two zip files x64 and x64-64
I used x64
And I see you used x64-64
So I'm wondering if there's a difference.

Also - I've compiled and linked whisper.cpp vs the v0.3.27 and then it failed, not the .dll drop-in way.
If it makes a difference.

I'll do a few more tests to get to the bottom of it.

@tamo
Copy link
Contributor

tamo commented Apr 23, 2024

0.3.27-x64 works fine here (without -DWHISPER_OPENBLAS_INTERFACE64=ON)

So I have no information about your crash
except it is

on whisper_full().

I hope you'll find a solution
but provide some more info if you need a help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants