Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ android {
applicationId = "me.rapierxbox.shellyelevatev2"
minSdk = 24
//noinspection ExpiredTargetSdkVersion
targetSdk = 24
targetSdk = 28
versionCode = versionCodeForBuild()
versionName = versionNameForBuild()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -880,9 +880,14 @@ private static MappedByteBuffer loadMappedFile(File file) throws Exception {

static Interpreter buildInterpreter(MappedByteBuffer model) {
Interpreter.Options opts = new Interpreter.Options().setNumThreads(1);
if (Build.VERSION.SDK_INT >= 30) {
opts.setUseNNAPI(true);
}
// Plain CPU kernels only (#105):
// - XNNPACK's aarch32 qs8 gemm kernel segfaults on the 32-bit Wall Displays
// (X2/PEGASUS, Gen1/STARGATE) as soon as a model runs on live audio.
// - NNAPI on these SoCs spawns a thread and leaks memory mappings per
// inference until pthread_create fails (~3 min on the X2), and brings
// nothing for these tiny models.
opts.setUseXNNPACK(false);
opts.setUseNNAPI(false);
return new Interpreter(model, opts);
}

Expand Down