mapbox-vision-android icon indicating copy to clipboard operation
mapbox-vision-android copied to clipboard

OpenCL 3.0 Support

Open joshbartel opened this issue 3 years ago • 1 comments

I have a Samsung Galaxy Tab S6 Lite. I was able to get the MapBox Vision SDK working on this tablet with Android 11. However after updating the tablet to Android 12 I get the following errors in the log when using the MapBox Vision SDK:

01-24 09:57:30.707 32678  8876 I MACE    : mace.cc:539 Initializing MaceEngine
01-24 09:57:30.707 32678  8876 W MACE    : mace.cc:58 The device does not support OpenCL
01-24 09:57:30.707 32678  8876 I MACE    : mace.cc:543 CheckGPUAvalibility(net_def, device_.get()) failed with error: Out of resources
01-24 09:57:31.226 32678  8876 I MACE    : mace.cc:957 Create MaceEngine from model graph proto and weights data
01-24 09:57:31.231 32678  8876 I MACE    : mace.cc:500 Creating MaceEngine, MACE version: v0.11.0-rc0-241-gc0c4f29
01-24 09:57:31.238 32678  8876 E MACE    : opencl_runtime.cc:800 Do not support OpenCL version: 3.0
01-24 09:57:31.238 32678  8876 I MACE    : mace.cc:682 Destroying MaceEngine

From the error message it appears that the MapBox Vision SDK is using the XiamMi/mace Mobile AI Compute Engine library and is using an older version (v0.11.0-rc0-241-gc0c4f29) that does not support OpenCL 3.0. It looks like version 1.1.1 of mace (release January 13 2022) does add OpenCL 3.0 support: https://github.com/XiaoMi/mace/releases/tag/v1.1.1

Another issue I ran into with the Android 12 update is that the MapBox libraries use a PendingIntent to launch telemetry but the version of the MapBox libraries used by vision do not have updates to support this android 12 change: https://developer.android.com/about/versions/12/behavior-changes-12#pending-intent-mutability

I was able to work around this by targeting a pre-android 12 SDK version, but it would be nice to have a vision library that worked with the latest android releases.

Here is the details on the tablet and android version I am using (from Settings): Tablet: Galaxy Tab S6 Lite Model number: SM-P610

Software Information: One UI version: 4.1

Android version: 12

Google Play system update: January 1, 2022

Kernel Version: 4.14.113-23851207 #1 Wed Mar 9 18:04:34 KST 2022

Build number: SP1A.210812.016.P610XXU2EVC5

SE for Android status: Enforcing SEPF_SM-P610_12_0001 Wed Mar 09 18:20:1 2022

Knox version: Knox 3.8 Knox API level 35

Service provider software version: SAOMC_SM-P610_OXM_XAC_12_0002 XAC/XAC/

Security software version: ASKS v4.5 Release 20211027 ADP v3.0 Release 20190001 SMR Mar-2022 Release 1

Android security patch level: March 1, 2022

joshbartel avatar Jan 24 '23 19:01 joshbartel

hi @joshbartel did you manage to get the MACE library updated?

reggirepret avatar Jun 05 '24 14:06 reggirepret