From 5db2e7358715359650bd40178c42090d9fd67338 Mon Sep 17 00:00:00 2001 From: Maary <24504742+Steve-Mr@users.noreply.github.com> Date: Sat, 20 Apr 2024 20:08:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=81=9C=E7=94=A8=20nnapi=20=E7=9A=84=E6=9C=89?= =?UTF-8?q?=E5=85=B3=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/build.gradle | 2 +- .../java/com/maary/shareas/WallpaperViewModel.kt | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 9f149e3..a9ae323 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,7 +12,7 @@ android { minSdkVersion 29 targetSdkVersion 34 versionCode 4 - versionName "3.0-alpha-240420" + versionName "3.0-alpha-240420-02" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildFeatures { diff --git a/app/src/main/java/com/maary/shareas/WallpaperViewModel.kt b/app/src/main/java/com/maary/shareas/WallpaperViewModel.kt index 127b8e6..b07c7c2 100644 --- a/app/src/main/java/com/maary/shareas/WallpaperViewModel.kt +++ b/app/src/main/java/com/maary/shareas/WallpaperViewModel.kt @@ -652,12 +652,12 @@ class WallpaperViewModel : ViewModel() { val sessionOptions: OrtSession.SessionOptions = OrtSession.SessionOptions() sessionOptions.registerCustomOpLibrary(OrtxPackage.getLibraryPath()) - sessionOptions.addNnapi( - EnumSet.of( - NNAPIFlags.USE_FP16, - NNAPIFlags.CPU_DISABLED - ) - ) +// sessionOptions.addNnapi( +// EnumSet.of( +// NNAPIFlags.USE_FP16, +// NNAPIFlags.CPU_DISABLED +// ) +// ) ortSession = ortEnv.createSession(readModel(context, model), sessionOptions) // 1. 输入是一个 bimap