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

Add error handling to graph_compute #1714

Merged
merged 1 commit into from
Jan 3, 2024
Merged

Conversation

finnvoor
Copy link
Contributor

@finnvoor finnvoor commented Jan 2, 2024

We are using whisper.cpp in an iOS app and due to GPU execution not being permitted when an iOS app is in the background, we are seeing crashes at

GGML_ASSERT(false);

This PR returns a bool from graph_compute indicating failure instead of asserting false to avoid crashing. Wasn't sure if this was the best way to fix this issue, but it is working for us at least. All backends other than metal currently just return true.

Please let me know if I missed something or if anyone has better ideas for error handling.

Fixes #1670 and #1664

Copy link
Owner

@ggerganov ggerganov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be good to merge (cc @slaren)

Copy link
Collaborator

@slaren slaren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good, we need to make more errors recoverable.

@ggerganov ggerganov merged commit a3d0aa7 into ggerganov:master Jan 3, 2024
40 checks passed
viktor-silakov pushed a commit to viktor-silakov/whisper_node_mic.cpp that referenced this pull request May 11, 2024
iThalay pushed a commit to iThalay/whisper.cpp that referenced this pull request Sep 23, 2024
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.

METAL: The library on iOS, Swift code, fails when running a transcription in background
3 participants