Skip to content

Conversation

peardox
Copy link
Contributor

@peardox peardox commented Apr 14, 2025

As per #2963
Added whisper_load_backends to whisper.h
Modified 3 examples (bench, cli and stream) to #ifdef GGML_BACKEND_DL call the function

@slaren
Copy link
Member

slaren commented Apr 14, 2025

In retrospect it was a mistake to include the call to load the backends (ggml_backend_load_all) in whisper.cpp. This is something that should be the responsibility of applications, so that they also have the freedom to choose what backends to load, and from which locations.

@peardox
Copy link
Contributor Author

peardox commented Apr 14, 2025

ggml_backend_load_all may be slight overkill but the multiple architectures for CPU is a benefit if doing a release especially in the case of x64.
The GGML_BACKEND_DL is rather useful.

@slaren
Copy link
Member

slaren commented Apr 14, 2025

My suggestion would be:

  • Remove whisper_load_backends
  • Add a call to ggml_backend_load_all during initialization to all the examples

@peardox
Copy link
Contributor Author

peardox commented Apr 14, 2025

whisper_load_backends can only be run once while ggml_backend_load_all has no such prevention

@peardox
Copy link
Contributor Author

peardox commented Apr 15, 2025

OK, made this PR significantly better with ggml_backend_load_all and ggml_backend_load_best.
Will redo ASAP

@peardox peardox closed this Apr 15, 2025
danbev added a commit to danbev/whisper.cpp that referenced this pull request May 28, 2025
This commit removes the `whisper_load_backends` function, which was used
to load all GGML backends.

The motivation for this change push the responsibility of loading
backends to user applications to give them more control over which
backends to load and when. See the references below for more context.

Resolves: ggml-org#3182
Refs: ggml-org#3042 (comment)
Refs: ggml-org#3042 (comment)
danbev added a commit that referenced this pull request May 29, 2025
* whisper : remove whisper_load_backends function

This commit removes the `whisper_load_backends` function, which was used
to load all GGML backends.

The motivation for this change push the responsibility of loading
backends to user applications to give them more control over which
backends to load and when. See the references below for more context.

Resolves: #3182
Refs: #3042 (comment)
Refs: #3042 (comment)

* ruby : add check for rwc is NULL

This commit adds a check to ensure that the `rwc` pointer is not NULL
before attempting to mark its members in the garbage collector.

The motivation for this is an attempt to see if this fixed the CI build
as I'm not able to reproduce the issue locally.

Refs: https://github.com/ggml-org/whisper.cpp/actions/runs/15299612277/job/43036694928?pr=3196
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

Successfully merging this pull request may close these issues.

2 participants