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

异常无法捕获 #235

Open
LYS86 opened this issue Dec 6, 2024 · 6 comments
Open

异常无法捕获 #235

LYS86 opened this issue Dec 6, 2024 · 6 comments
Assignees
Labels
type:bug Bug type:gpu delegate Issue with GPU delegation

Comments

@LYS86
Copy link

LYS86 commented Dec 6, 2024

你好,我在使用yolo模型时遇到了一些问题,使用gpu时部署yolo10,yolo11模型,会崩溃,无法捕获异常

      try {
                interpreter = InterpreterApi.create(modelBuffer, options)
            } catch (e: Exception) {
                log.e("InterpreterApi.create failed: ${e.message}")
                throw RuntimeException("InterpreterApi.create failed: ${e.message}", e)
            }
                                                                                      加载模型成功:/storage/emulated/0/脚本/model/yolov10n_float16.tflite
09:24:13.813 TensorFlowLite                                                         I  Loaded native library: tensorflowlite_jni
09:24:13.816                                                                        I  Didn't load native library: tensorflowlite_jni_gms_client
09:24:13.818                                                                        I  Found application TF Lite runtime client in org.tensorflow.lite
09:24:13.818                                                                        I  TfLiteRuntime.FROM_APPLICATION_ONLY: Using application TF Lite runtime client from org.tensorflow.lite
09:24:13.824 tflite                                                                 I  Initialized TensorFlow Lite runtime.
09:24:13.830 libc                                                                   W  Access denied finding property "ro.hardware.chipname"
09:24:13.848 tflite                                                                 I  Loaded OpenCL library with dlopen.
09:24:13.860                                                                        I  Replacing 153 out of 798 node(s) with delegate (TfLiteGpuDelegateV2) node, yielding 3 partitions for the whole graph.
09:24:13.867                                                                        I  Loaded OpenCL library with dlopen.
09:24:13.873 libc                                                                   W  Access denied finding property "ro.vendor.gfx.32bit.target"
09:24:16.698 CrashReport-Native                                                     E  Failed to get java thread with thread name: 33448250835.js]
09:24:16.763 CrashHandler                                                           D  onCrashHandleStart: crashType = 2, errorType = SIGSEGV(SEGV_MAPERR), msg = , stack = #00    pc 0000000000dcca18    /vendor/lib64/libllvm-qcom.so [arm64-v8a::fd29b3cc397be9542a1b2c8f898d90eb]
                                                                                       #01    pc 0000000000e172c8    /vendor/lib64/libllvm-qcom.so [arm64-v8a::fd29b3cc397be9542a1b2c8f898d90eb]
                                                                                       #02    pc 0000000000e1a1c8    /vendor/lib64/libllvm-qcom.so [arm64-v8a::fd29b3cc397be9542a1b2c8f898d90eb]
                                                                                       #03    pc 0000000000e25210    /vendor/lib64/libllvm-qcom.so [arm64-v8a::fd29b3cc397be9542a1b2c8f898d90eb]
                                                                                       #04    pc 0000000000e244c4    /vendor/lib64/libllvm-qcom.so [arm64-v8a::fd29b3cc397be9542a1b2c8f898d90eb]
                                                                                       #05    pc 0000000000929444    /vendor/lib64/libllvm-qcom.so [arm64-v8a::fd29b3cc397be9542a1b2c8f898d90eb]
                                                                                       #06    pc 0000000000928be0    /vendor/lib64/libllvm-qcom.so [arm64-v8a::fd29b3cc397be9542a1b2c8f898d90eb]
                                                                                       #07    pc 0000000000928a10    /vendor/lib64/libllvm-qcom.so [arm64-v8a::fd29b3cc397be9542a1b2c8f898d90eb]
                                                                                       #08    pc 0000000000f1a20c    /vendor/lib64/libllvm-qcom.so [arm64-v8a::fd29b3cc397be9542a1b2c8f898d90eb]
                                                                                       #09    pc 0000000000f1b09c    /vendor/lib64/libllvm-qcom.so [arm64-v8a::fd29b3cc397be9542a1b2c8f898d90eb]
                                                                                       #10    pc 0000000001ac9114    /vendor/lib64/libllvm-qcom.so [arm64-v8a::fd29b3cc397be9542a1b2c8f898d90eb]
                                                                                       #11    pc 0000000001aeb60c    /vendor/lib64/libllvm-qcom.so [arm64-v8a::fd29b3cc397be9542a1b2c8f898d90eb]
                                                                                       #12    pc 0000000001ae5eb4    /vendor/lib64/libllvm-qcom.so (cl_compiler_link_program+492) [arm64-v8a::fd29b3cc397be9542a1b2c8f898d90eb]
                                                                                       #13    pc 000000000027ccb4    /vendor/lib64/libCB.so [arm64-v8a::24374e5b79d9b43dfc53c3f5638d17d1]
                                                                                       #14    pc 000000000027bd58    /vendor/lib64/libCB.so (cl_program_build_immediate+272) [arm64-v8a::24374e5b79d9b43dfc53c3f5638d17d1]
                                                                                       #15    pc 0000000000282668    /vendor/lib64/libCB.so (cb_build_program+1072) [arm64-v8a::24374e5b79d9b43dfc53c3f5638d17d1]
                                                                                       #16    pc 0000000000013360    /vendor/lib64/libOpenCL.so (qCLDrvAPI_clBuildProgram+112) [arm64-v8a::10ea9514a364b8fc498f8ed64e6fb2e8]
                                                                                       #17    pc 00000000001650ac    /data/app/~~H64e42iACxGl1QlKqpNqOg==/org.autojs.autojs6.debug-Znz0TxY2HJroXMaKCNc3Yw==/lib/arm64/libtensorflowlite_gpu_jni.so [arm64-v8a::85ee85b3b999e40f77f5ec31b04e320c]
                                                                                       #18    pc 0000000000164fe0    /data/app/~~H64e42iACxGl1QlKqpNqOg==/org.autojs.autojs6.debug-Znz0TxY2HJroXMaKCNc3Yw==/lib/arm64/libtensorflowlite_gpu_jni.so [arm64-v8a::85ee85b3b999e40f77f5ec31b04e320c]
                                                                                       #19    pc 00000000001607e8    /data/app/~~H64e42iACxGl1QlKqpNqOg==/org.autojs.autojs6.debug-Znz0TxY2HJroXMaKCNc3Yw==/lib/arm64/libtensorflowlite_gpu_jni.so [arm64-v8a::85ee85b3b999e40f77f5ec31b04e320c]
                                                                                       #20    pc 000000000010f80c    /data/app/~~H64e42iACxGl1QlKqpNqOg==/org.autojs.autojs6.debug-Znz0TxY2HJroXMaKCNc3Yw==/lib/arm64/libtensorflowlite_gpu_jni.so [arm64-v8a::85ee85b3b999e40f77f5ec31b04e320c]
                                                                                       #21    pc 0000000000105fe4    /data/app/~~H64e42iACxGl1QlKqpNqOg==/org.autojs.autojs6.debug-Znz0TxY2HJroXMaKCNc3Yw==/lib/arm64/libtensorflowlite_gpu_jni.so [arm64-v8a::85ee85b3b999e40f77f5ec31b04e320c]
                                                                                       #22    pc 0000000000105a4c    /data/app/~~H64e42iACxGl1QlKqpNqOg==/org.autojs.autojs6.debug-Znz0TxY2HJroXMaKCNc3Yw==/lib/arm64/libtensorflowlite_gpu_jni.so [arm64-v8a::85ee85b3b999e40f77f5ec31b04e320c]
                                                                                       #23    pc 00000000001057d8    /data/app/~~H64e42iACxGl1QlKqpNqOg==/org.autojs.autojs6.debug-Znz0TxY2HJroXMaKCNc3Yw==/lib/arm64/libtensorflowlite_gpu_jni.so [arm64-v8a::85ee85b3b999e40f77f5ec31b04e320c]
                                                                                       #24    pc 00000000000ffdf4    /data/app/~~H64e42iACxGl1QlKqpNqOg==/org.autojs.autojs6.debug-Znz0TxY2HJroXMaKCNc3Yw==/lib/arm64/libtensorflowlite_gpu_jni.so [arm64-v8a::85ee85b3b999e40f77f5ec31b04e320c]
                                                                                       #25    pc 00000000000b6cd4    /data/app/~~H64e42iACxGl1QlKqpNqOg==/org.autojs.autojs6.debug-Znz0TxY2HJroXMaKCNc3Yw==/lib/arm64/libtensorflowlite_gpu_jni.so [arm64-v8a::85ee85b3b999e40f77f5ec31b04e320c]
                                                                                       #26    pc 00000000000b6748    /data/app/~~H64e42iACxGl1QlKqpNqOg==/org.autojs.autojs6.debug-Znz0TxY2HJroXMaKCNc3Yw==/lib/arm64/libtensorflowlite_gpu_jni.so [arm64-v8a::85ee85b3b999e40f77f5ec31b04e320c]
09:24:16.763                                                                        D  #27    pc 00000000000b7748    /data/app/~~H64e42iACxGl1QlKqpNqOg==/org.autojs.autojs6.debug-Znz0TxY2HJroXMaKCNc3Yw==/lib/arm64/libtensorflowlite_gpu_jni.so [arm64-v8a::85ee85b3b999e40f77f5ec31b04e320c]
                                                                                       #28    pc 0000000000320f64    /data/app/~~H64e42iACxGl1QlKqpNqOg==/org.autojs.autojs6.debug-Znz0TxY2HJroXMaKCNc3Yw==/lib/arm64/libtensorflowlite_jni.so [arm64-v8a::850a925e891f910bae3c83095332764b]
                                                                                       #29    pc 0000000000320908    /data/app/~~H64e42iACxGl1QlKqpNqOg==/org.autojs.autojs6.debug-Znz0TxY2HJroXMaKCNc3Yw==/lib/arm64/libtensorflowlite_jni.so [arm64-v8a::850a925e891f910bae3c83095332764b]
                                                                                       #30    pc 0000000000320524    /data/app/~~H64e42iACxGl1QlKqpNqOg==/org.autojs.autojs6.debug-Znz0TxY2HJroXMaKCNc3Yw==/lib/arm64/libtensorflowlite_jni.so [arm64-v8a::850a925e891f910bae3c83095332764b]
                                                                                       #31    pc 00000000000b3174    /data/app/~~H64e42iACxGl1QlKqpNqOg==/org.autojs.autojs6.debug-Znz0TxY2HJroXMaKCNc3Yw==/lib/arm64/libtensorflowlite_gpu_jni.so [arm64-v8a::85ee85b3b999e40f77f5ec31b04e320c]
                                                                                       #32    pc 0000000000325400    /data/app/~~H64e42iACxGl1QlKqpNqOg==/org.autojs.autojs6.debug-Znz0TxY2HJroXMaKCNc3Yw==/lib/arm64/libtensorflowlite_jni.so [arm64-v8a::850a925e891f910bae3c83095332764b]
                                                                                       java:
                                                                                       [Failed to get Java stack]


@pkgoogle
Copy link

pkgoogle commented Jan 8, 2025

Hi @LYS86, can you provide an exported android studio project? Also can you let me know where you got your Yolo10/11 model from?

@LYS86
Copy link
Author

LYS86 commented Jan 9, 2025

项目代码 Autojs yolo8

关于该问题的讨论 yolov11 export to tflite does not work on Android GPU

模型导出,yolov8n,yolov9t不会触发崩溃。

from ultralytics import YOLO

# yolov8n,yolov9t,yolov10n,yolo11n
model = YOLO("yolo11n.pt")

model.export(format="tflite")

@gaikwadrahul8
Copy link
Contributor

Hi, @LYS86
I apologize for the delayed response, I see similar issue has been reported by one of the user here :tensorflow/tensorflow#80019 so we'll have to dig more into this issue and will update you

Thank you for your understanding and patience.

@pkgoogle pkgoogle self-assigned this Jan 22, 2025
@pkgoogle
Copy link

Hi @LYS86, I believe you are applying a GPU delegate or something like that? Can you show me the code and the context around where/how you apply the delegate? Preferably the more you share of your project the faster/less turn around it will take to dig into this. Thanks.

@LYS86
Copy link
Author

LYS86 commented Jan 25, 2025

@gaikwadrahul8 是的,同样的问题,yolo11的模型转换出了问题,一个有效的解决方法是不使用yolo的导出代码,自行转换模型

@pkgoogle

这份代码导出的模型会触发异常,导致崩溃,yolo11n_saved_model/yolo11n_float16.tflite

from ultralytics import YOLO
model = YOLO("yolo11n.pt")
model.export(format="tflite")

这里导出的模型不会触发异常,saved_model/yolo11n_float16.tflite,两个模型使用cpu无异常

 onnx2tf -i yolo11n.onnx
dependencies /* LiteRT */ {
    implementation("com.google.ai.edge.litert:litert:1.0.1")
    implementation("com.google.ai.edge.litert:litert-gpu:1.0.1")
    implementation("com.google.ai.edge.litert:litert-metadata:1.0.1")
    implementation("com.google.ai.edge.litert:litert-support:1.0.1")
    implementation("com.google.ai.edge.litert:litert-gpu-api:1.0.1")
}
import android.util.Log
import org.tensorflow.lite.InterpreterApi
import org.tensorflow.lite.gpu.CompatibilityList
import org.tensorflow.lite.gpu.GpuDelegate
import java.nio.MappedByteBuffer

class test {
    private var gpuDelegate: GpuDelegate? = null
    protected lateinit var options: InterpreterApi.Options
    private lateinit var interpreter: InterpreterApi

    init {
        CompatibilityList().use { compatibilityList ->
            if (compatibilityList.isDelegateSupportedOnThisDevice) {
                // val gpu=compatibilityList.bestOptionsForThisDevice
                // gpuDelegate = GpuDelegate(gpu)
                gpuDelegate=GpuDelegate()
            }
        }
    }

    private fun getOptions(isGPU: Boolean): InterpreterApi.Options {
        val opts = InterpreterApi.Options().apply {
            useNNAPI = true
        }
        if (!isGPU) return opts
        if (gpuDelegate == null) {
            Log.w("test", "GPU不支持")
            return opts
        }
        return opts.apply { addDelegate(gpuDelegate) }
    }

    /**
     * 加载模型
     * @param path 模型文件路径,sd路径
     * @param isGPU 是否使用GPU
     */
    fun loadModel(path: String, isGPU: Boolean) {
        options = getOptions(isGPU)
        loadModel(path, options)
    }

    private fun loadModel(path: String, options: InterpreterApi.Options) {
        try {
            val modelBuffer: MappedByteBuffer = FileUtil.loadModel(path)
            interpreter = InterpreterApi.create(modelBuffer, options)
        } catch (e: Exception) {
            throw RuntimeException("${e.message}")
        }
    }
}

这份示例是否足够,是否需要更多信息。

@pkgoogle
Copy link

Hi @LYS86, thanks for the extra information, I think that's good for now...

I tried adjusting one of our examples to naively use a GPU delegate and it seems to be failing for a different reason, so there does seem to be a bug independent of the specific model:

the example I used:

git clone https://github.com/google-ai-edge/litert-samples.git
# open litert-samples/examples/image_classification/android

modify android/app/build.gradle.kts (add two lines to dependencies):

implementation("com.google.ai.edge.litert:litert-gpu:1.0.1")
implementation("com.google.ai.edge.litert:litert-gpu-api:1.0.1")

In "ImageClassificationHelper.kt", after options is defined (~line 95) add:

val gpuDelegate = GpuDelegate()
options.addDelegate(gpuDelegate)

Then execute... this error occurs with the default models in that example. I should note I'm using an emulator (Pixel 8 Pro API 34-ext12 ARM).

my logcat:

2025-01-27 11:41:46.091  3193-3193  eclassification         com....examples.imageclassification  I  Late-enabling -Xcheck:jni
2025-01-27 11:41:46.156  3193-3193  eclassification         com....examples.imageclassification  I  Using CollectorTypeCMC GC.
2025-01-27 11:41:46.305  3193-3193  Compatibil...geReporter com....examples.imageclassification  D  Compat change id reported: 171979766; UID 10191; state: ENABLED
2025-01-27 11:41:46.305  3193-3193  Compatibil...geReporter com....examples.imageclassification  D  Compat change id reported: 242716250; UID 10191; state: ENABLED
2025-01-27 11:41:46.333  3193-3193  ziparchive              com....examples.imageclassification  W  Unable to open '/data/app/~~NqPLOSux8eLiYcraUYWF1g==/com.google.aiedge.examples.imageclassification-_i6no0BXP-3JxmtX1M3GGw==/base.dm': No such file or directory
2025-01-27 11:41:46.333  3193-3193  ziparchive              com....examples.imageclassification  W  Unable to open '/data/app/~~NqPLOSux8eLiYcraUYWF1g==/com.google.aiedge.examples.imageclassification-_i6no0BXP-3JxmtX1M3GGw==/base.dm': No such file or directory
2025-01-27 11:41:46.930  3193-3193  nativeloader            com....examples.imageclassification  D  Configuring clns-6 for other apk /data/app/~~NqPLOSux8eLiYcraUYWF1g==/com.google.aiedge.examples.imageclassification-_i6no0BXP-3JxmtX1M3GGw==/base.apk. target_sdk_version=34, uses_libraries=, library_path=/data/app/~~NqPLOSux8eLiYcraUYWF1g==/com.google.aiedge.examples.imageclassification-_i6no0BXP-3JxmtX1M3GGw==/lib/arm64:/data/app/~~NqPLOSux8eLiYcraUYWF1g==/com.google.aiedge.examples.imageclassification-_i6no0BXP-3JxmtX1M3GGw==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.google.aiedge.examples.imageclassification
2025-01-27 11:41:46.969  3193-3193  GraphicsEnvironment     com....examples.imageclassification  V  Currently set values for:
2025-01-27 11:41:46.969  3193-3193  GraphicsEnvironment     com....examples.imageclassification  V    angle_gl_driver_selection_pkgs=[]
2025-01-27 11:41:46.969  3193-3193  GraphicsEnvironment     com....examples.imageclassification  V    angle_gl_driver_selection_values=[]
2025-01-27 11:41:46.971  3193-3193  GraphicsEnvironment     com....examples.imageclassification  V  ANGLE GameManagerService for com.google.aiedge.examples.imageclassification: false
2025-01-27 11:41:46.971  3193-3193  GraphicsEnvironment     com....examples.imageclassification  V  com.google.aiedge.examples.imageclassification is not listed in per-application setting
2025-01-27 11:41:46.971  3193-3193  GraphicsEnvironment     com....examples.imageclassification  V  Neither updatable production driver nor prerelease driver is supported.
2025-01-27 11:41:47.077  1388-1541  .apps.wellbeing         pid-1388                             E  Failed to open APK '/data/app/~~_jEHWwp5i12q81hs0Er4YA==/com.google.aiedge.examples.imageclassification-FJqMEriGMfUgBWxHiJbg1w==/base.apk': I/O error
2025-01-27 11:41:47.079  1388-1541  .apps.wellbeing         pid-1388                             E  Failed to open APK '/data/app/~~_jEHWwp5i12q81hs0Er4YA==/com.google.aiedge.examples.imageclassification-FJqMEriGMfUgBWxHiJbg1w==/base.apk': I/O error
2025-01-27 11:41:47.079  1388-1541  ResourcesManager        pid-1388                             E  failed to add asset path '/data/app/~~_jEHWwp5i12q81hs0Er4YA==/com.google.aiedge.examples.imageclassification-FJqMEriGMfUgBWxHiJbg1w==/base.apk'
                                                                                                    java.io.IOException: Failed to load asset path /data/app/~~_jEHWwp5i12q81hs0Er4YA==/com.google.aiedge.examples.imageclassification-FJqMEriGMfUgBWxHiJbg1w==/base.apk
                                                                                                    	at android.content.res.ApkAssets.nativeLoad(Native Method)
                                                                                                    	at android.content.res.ApkAssets.<init>(ApkAssets.java:298)
                                                                                                    	at android.content.res.ApkAssets.loadFromPath(ApkAssets.java:147)
                                                                                                    	at android.app.ResourcesManager.loadApkAssets(ResourcesManager.java:474)
                                                                                                    	at android.app.ResourcesManager.-$$Nest$mloadApkAssets(Unknown Source:0)
                                                                                                    	at android.app.ResourcesManager$ApkAssetsSupplier.load(ResourcesManager.java:167)
                                                                                                    	at android.app.ResourcesManager.createAssetManager(ResourcesManager.java:550)
                                                                                                    	at android.app.ResourcesManager.createResourcesImpl(ResourcesManager.java:637)
                                                                                                    	at android.app.ResourcesManager.findOrCreateResourcesImplForKeyLocked(ResourcesManager.java:689)
                                                                                                    	at android.app.ResourcesManager.createResources(ResourcesManager.java:1035)
                                                                                                    	at android.app.ResourcesManager.getResources(ResourcesManager.java:1138)
                                                                                                    	at android.app.ActivityThread.getTopLevelResources(ActivityThread.java:2597)
                                                                                                    	at android.app.ApplicationPackageManager.getResourcesForApplication(ApplicationPackageManager.java:2060)
                                                                                                    	at android.app.ApplicationPackageManager.getResourcesForApplication(ApplicationPackageManager.java:2046)
                                                                                                    	at android.app.ApplicationPackageManager.getText(ApplicationPackageManager.java:2363)
                                                                                                    	at android.content.pm.PackageItemInfo.loadUnsafeLabel(PackageItemInfo.java:222)
                                                                                                    	at android.content.pm.PackageItemInfo.loadLabel(PackageItemInfo.java:212)
                                                                                                    	at android.app.ApplicationPackageManager.getApplicationLabel(ApplicationPackageManager.java:2408)
                                                                                                    	at cub.c(PG:38)
                                                                                                    	at cfo.apply(PG:391)
                                                                                                    	at e$$ExternalSyntheticApiModelOutline1.m(D8$$SyntheticClass:45)
                                                                                                    	at lbf.accept(PG:44)
                                                                                                    	at j$.util.stream.M0.accept(SourceFile:3)
                                                                                                    	at j$.util.D.x(SourceFile:24)
                                                                                                    	at j$.util.T.forEachRemaining(SourceFile:24)
                                                                                                    	at j$.util.stream.b.c(SourceFile:21)
                                                                                                    	at j$.util.stream.b.y(SourceFile:8)
                                                                                                    	at j$.util.stream.F.b(SourceFile:5)
                                                                                                    	at j$.util.stream.b.f(SourceFile:35)
                                                                                                    	at j$.util.stream.c1.collect(SourceFile:83)
                                                                                                    	at buu.a(PG:99)
                                                                                                    	at kal.a(PG:301)
                                                                                                    	at kal.a(PG:38)
                                                                                                    	at lrz.a(PG:3)
                                                                                                    	at lrf.run(PG:19)
                                                                                                    	at lsb.run(PG:5)
                                                                                                    	at lqj.run(PG:17)
                                                                                                    	at ibp.run(PG:3)
                                                                                                    	at lni.run(PG:50)
                                                                                                    	at hrq.run(PG:784)
                                                                                                    	at java.lang.Thread.run(Thread.java:1012)
                                                                                                    	at idb.run(PG:64)
2025-01-27 11:41:47.105  3193-3345  libEGL                  com....examples.imageclassification  D  loaded /vendor/lib64/egl/libEGL_emulation.so
2025-01-27 11:41:47.107  3193-3345  libEGL                  com....examples.imageclassification  D  loaded /vendor/lib64/egl/libGLESv1_CM_emulation.so
2025-01-27 11:41:47.109  3193-3345  libEGL                  com....examples.imageclassification  D  loaded /vendor/lib64/egl/libGLESv2_emulation.so
2025-01-27 11:41:47.226  3193-3193  Compatibil...geReporter com....examples.imageclassification  D  Compat change id reported: 237531167; UID 10191; state: DISABLED
2025-01-27 11:41:47.230  3193-3193  OpenGLRenderer          com....examples.imageclassification  W  Unknown dataspace 0
2025-01-27 11:41:47.512  3193-3193  ImageClassification     com....examples.imageclassification  I  Done creating TFLite buffer from efficientnet_lite0.tflite
2025-01-27 11:41:47.517  3193-3193  tflite                  com....examples.imageclassification  I  Created TensorFlow Lite delegate for GPU.
2025-01-27 11:41:47.535  3193-3193  ImageClassification     com....examples.imageclassification  I  Successfully loaded model metadata [labels_without_background.txt]
2025-01-27 11:41:47.538  3193-3193  TensorFlowLite          com....examples.imageclassification  I  Loaded native library: tensorflowlite_jni
2025-01-27 11:41:47.544  3193-3193  TensorFlowLite          com....examples.imageclassification  I  Didn't load native library: tensorflowlite_jni_gms_client
2025-01-27 11:41:47.550  3193-3193  tflite                  com....examples.imageclassification  I  Initialized TensorFlow Lite runtime.
2025-01-27 11:41:47.550  3193-3193  libc                    com....examples.imageclassification  W  Access denied finding property "ro.hardware.chipname"
2025-01-27 11:41:47.558  3193-3193  tflite                  com....examples.imageclassification  I  Failed to load OpenCL library with dlopen: dlopen failed: library "libvndksupport.so" not found. Trying ICD loader.
2025-01-27 11:41:47.562  3193-3193  tflite                  com....examples.imageclassification  I  Replacing 62 out of 62 node(s) with delegate (TfLiteGpuDelegateV2) node, yielding 1 partitions for the whole graph.
2025-01-27 11:41:47.655  3193-3193  tflite                  com....examples.imageclassification  I  Failed to load OpenCL library with dlopen: dlopen failed: library "libvndksupport.so" not found. Trying ICD loader.
2025-01-27 11:41:47.689  3193-3193  libEGL                  com....examples.imageclassification  E  call to OpenGL ES API with no current context (logged once per thread)
2025-01-27 11:41:47.692  3193-3193  libEGL                  com....examples.imageclassification  E  call to OpenGL ES API with no current context (logged once per thread)
2025-01-27 11:41:47.693  3193-3193  libEGL                  com....examples.imageclassification  E  call to OpenGL ES API with no current context (logged once per thread)
2025-01-27 11:41:47.693  3193-3193  libEGL                  com....examples.imageclassification  E  call to OpenGL ES API with no current context (logged once per thread)
2025-01-27 11:41:47.723  3193-3193  emuglGLESv2_enc         com....examples.imageclassification  E  device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glTexStorage2D:4319 GL error 0x502 condition [!state->getBoundTexture(target)]
2025-01-27 11:41:47.723  3193-3193  emuglGLESv2_enc         com....examples.imageclassification  E  device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glFramebufferTexture2D:3219 GL error 0x502 condition [!state->getBoundFramebuffer(target)]
2025-01-27 11:41:47.723  3193-3193  emuglGLESv2_enc         com....examples.imageclassification  E  device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glDrawBuffers:4226 GL error 0x501 condition [n < 0 || n > ctx->m_state->getMaxDrawBuffers()]
2025-01-27 11:41:47.743  3193-3193  tflite                  com....examples.imageclassification  I  Created 0 GPU delegate kernels.
2025-01-27 11:41:47.744  3193-3193  ImageClassification     com....examples.imageclassification  I  Create TFLite from efficientnet_lite0.tflite is failed Internal error: Failed to apply delegate: Can not open OpenCL library on this device - undefined symbol: clEnqueueReleaseEGLObjectsKHR
                                                                                                    Falling back to OpenGL
                                                                                                    TfLiteGpuDelegate Init: [GL_INVALID_VALUE]: A numeric argument is out of range.
                                                                                                    TfLiteGpuDelegate Prepare: delegate is not initialized
                                                                                                    Node number 62 (TfLiteGpuDelegateV2) failed to prepare.
                                                                                                    Restored original execution plan after delegate application failure.
2025-01-27 11:41:47.881  3193-3193  eclassification         com....examples.imageclassification  W  Method boolean androidx.compose.runtime.snapshots.SnapshotStateList.conditionalUpdate(boolean, kotlin.jvm.functions.Function1) failed lock verification and will run slower.
                                                                                                    Common causes for lock verification issues are non-optimized dex code
                                                                                                    and incorrect proguard optimizations.
2025-01-27 11:41:47.881  3193-3193  eclassification         com....examples.imageclassification  W  Method boolean androidx.compose.runtime.snapshots.SnapshotStateList.conditionalUpdate$default(androidx.compose.runtime.snapshots.SnapshotStateList, boolean, kotlin.jvm.functions.Function1, int, java.lang.Object) failed lock verification and will run slower.
2025-01-27 11:41:47.881  3193-3193  eclassification         com....examples.imageclassification  W  Method java.lang.Object androidx.compose.runtime.snapshots.SnapshotStateList.mutate(kotlin.jvm.functions.Function1) failed lock verification and will run slower.
2025-01-27 11:41:47.881  3193-3193  eclassification         com....examples.imageclassification  W  Method void androidx.compose.runtime.snapshots.SnapshotStateList.update(boolean, kotlin.jvm.functions.Function1) failed lock verification and will run slower.
2025-01-27 11:41:47.881  3193-3193  eclassification         com....examples.imageclassification  W  Method void androidx.compose.runtime.snapshots.SnapshotStateList.update$default(androidx.compose.runtime.snapshots.SnapshotStateList, boolean, kotlin.jvm.functions.Function1, int, java.lang.Object) failed lock verification and will run slower.
2025-01-27 11:41:47.887  3193-3193  Compatibil...geReporter com....examples.imageclassification  D  Compat change id reported: 171228096; UID 10191; state: ENABLED
2025-01-27 11:41:48.633  3193-3454  CameraManagerGlobal     com....examples.imageclassification  I  Connecting to camera service
2025-01-27 11:41:48.642  3193-3454  Compatibil...geReporter com....examples.imageclassification  D  Compat change id reported: 250678880; UID 10191; state: ENABLED
2025-01-27 11:41:48.689  3193-3454  CameraRepository        com....examples.imageclassification  D  Added camera: 1
2025-01-27 11:41:48.699  3193-3454  Camera2CameraInfo       com....examples.imageclassification  I  Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_FULL
2025-01-27 11:41:48.734  3193-3454  CameraRepository        com....examples.imageclassification  D  Added camera: 10
2025-01-27 11:41:48.735  3193-3454  Camera2CameraInfo       com....examples.imageclassification  I  Device Level: INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED
2025-01-27 11:41:48.735  3193-3454  CameraValidator         com....examples.imageclassification  D  Verifying camera lens facing on emu64a, lensFacingInteger: null
2025-01-27 11:41:48.815  3193-3344  OpenGLRenderer          com....examples.imageclassification  W  Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2025-01-27 11:41:48.815  3193-3344  OpenGLRenderer          com....examples.imageclassification  W  Failed to initialize 101010-2 format, error = EGL_SUCCESS
2025-01-27 11:41:48.864  3193-3344  Gralloc4                com....examples.imageclassification  I  mapper 4.x is not supported
2025-01-27 11:41:48.886  3193-3344  OpenGLRenderer          com....examples.imageclassification  E  Unable to match the desired swap behavior.

@pkgoogle pkgoogle added type:bug Bug type:gpu delegate Issue with GPU delegation labels Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Bug type:gpu delegate Issue with GPU delegation
Projects
None yet
Development

No branches or pull requests

3 participants