Skip to content

whisper : add check for backend support - #4155

Merged
danbev merged 2 commits into
ggml-org:masterfrom
renvins:fix-whisper-backend-weights
Nov 7, 2026
Merged

danbev merged 2 commits into
ggml-org:masterfrom
renvins:fix-whisper-backend-weights

Conversation

@renvins

@renvins renvins commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Whisper was deciding where the weights went before knowing whether the GPU backend would have started. It puts the weights in a buffer without knowing what mentioned before.

If the GPU device fails, it adds the CPU backend, but we should check if the running backend can use that specific buffer initialized earlier.

Thus, I added a check to see if that backend can use each weight buffer before the scheduler runs, and return an error if none can. Furthermore, freeing the state would free whisper batch pointers as well, for that reason I initialized them with nullptr.

@renvins

renvins commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

@danbev ready for your review.

Comment thread src/whisper.cpp Resolved
@renvins

renvins commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

Ready to be merged.

@danbev

danbev commented Nov 7, 2026

Copy link
Copy Markdown
Member

I've looked into the CI (wasm) failure in #4157.

And I'll look into the self-hosted gpu-vulkan-nvidia-cm2 separately but I does not look related to this PR.

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