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

Crash on DLL unload when compiled with Vulkan but forcing CPU #2373

Open
SRHMorris opened this issue Aug 22, 2024 · 0 comments
Open

Crash on DLL unload when compiled with Vulkan but forcing CPU #2373

SRHMorris opened this issue Aug 22, 2024 · 0 comments

Comments

@SRHMorris
Copy link

I've built whisper.cpp from commit 9e3c534 as a dll with Vulkan support and using the base.en model.

This is on windows with MSVC (VS version 17.11.0).

My code loads this dll at runtime, so essentially looks like this:

auto ggml = LoadLibrary("ggml.dll");
auto whisper = LoadLibrary("whisper.dll");

// load necessary functions, e.g.
auto whisper_context_default_params = reinterpret_cast<decltype(&::whisper_context_default_params)>(GetProcAddress(whisper, "whisper_context_default_params");
...

auto ctxParams = whisper_context_default_params();
ctxParams.use_gpu = false;

auto wparams = whisper_full_default_params(whisper_sampling_strategy::WHISPER_SAMPLING_BEAM_SEARCH);

// other code follows the example at the top of whisper.h to successfully transcribe a file

FreeLibrary(ggml); // crash here
FreeLibrary(whisper);

If I set ctxParams.use_gpu to true so that it successfully uses Vulkan I don't get the crash. As I only force the CPU for debugging, this isn't too important.

I'm unsure if this is a bug in GGML or Whisper.cpp, but as it is triggered via the Whisper.cpp API I've logged it here.

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

1 participant