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

feat: sync whisper.cpp (enable ggml-alloc) #123

Merged
merged 11 commits into from
Oct 5, 2023
Merged

Conversation

jhen0409
Copy link
Member

ggerganov/whisper.cpp#1270

It can be tested by running example/ or npm install https://github.com/mybigday/whisper.rn#test-alloc-and-metal.

@jhen0409
Copy link
Member Author

My test results in iPhone 13 Pro Max & iPad Air 5: ggerganov/whisper.cpp#1270 (comment)

@jobpaardekooper
Copy link
Contributor

Do you need more testing for this to move forward? Maybe I can help or something.

@jhen0409
Copy link
Member Author

jhen0409 commented Oct 4, 2023

I want to finish ggerganov/whisper.cpp#1293 before enable Metal.

We can still sync whisper.cpp first for ggml-alloc, but GGML_USE_METAL will not be enabled for the time being.

@jhen0409 jhen0409 changed the title feat: test ggml-alloc & ggml-metal feat: sync whisper.cpp (enable ggml-alloc) Oct 5, 2023
MLModelConfiguration *config = [[MLModelConfiguration alloc] init];
config.computeUnits = MLComputeUnitsCPUAndGPU;
//config.computeUnits = MLComputeUnitsCPUAndNeuralEngine;
//config.computeUnits = MLComputeUnitsAll;
Copy link
Member Author

Choose a reason for hiding this comment

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

We may keep use MLComputeUnitsAll (considering make a param for that), because the ANE performance may be better than GPU on iOS devices.

@jhen0409 jhen0409 marked this pull request as ready for review October 5, 2023 02:13
@jhen0409 jhen0409 merged commit 8a58082 into main Oct 5, 2023
4 checks passed
@jhen0409 jhen0409 deleted the test-alloc-and-metal branch October 5, 2023 04:06
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.

None yet

2 participants