Skip to content

Conversation

@danbev
Copy link
Member

@danbev danbev commented Mar 25, 2025

This commit updates the whisper.android.java build to include the new ggml source files and directories. The gradle build configuration is also updated to include the aliyun maven repository.

danbev added 2 commits March 25, 2025 06:41
This commit updates the whisper.android.java build to include the
new ggml source files and directories. The gradle build configuration is
also updated to include the aliyun maven repository.
This commit adds GGML_USE_CPU to whisper library in order to enable the
CPU backend to work.

I'm not currently sure about the aproach to take with regards to the
backends on Android. I went down the dynamic library route, but it was
a struggle and perhaps not the best way to go. I'm still looking how to
enable GPU backends and which ones are available.
@danbev
Copy link
Member Author

danbev commented Mar 25, 2025

With the latest change I'm able to build and install the example to a Android Emulator and run inference using the CPU backend:
image

@danbev
Copy link
Member Author

danbev commented Mar 25, 2025

@ggerganov Do you know it this is "enough" of a test, and is this basically what the example did before as well?

@ggerganov
Copy link
Member

Yes, this is good enough for the example.

The main issue is that the build process of ggml has to be done via CMake, similar to the XCFramework examples. This will avoid having duplicate build scripts and will allow ggml to automatically use the available CPU instruction sets in the future when we start to support that for Arm CPUs. But this is overall a low priority atm, so this is good for now.

@danbev danbev marked this pull request as ready for review March 25, 2025 14:42
@danbev danbev merged commit 226d344 into ggml-org:master Mar 25, 2025
47 checks passed
@danbev danbev deleted the android-java branch April 1, 2025 03:47
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