Declare the DSP's RPC library, so the app can reach the Hexagon
QNN's Hexagon stub loads libcdsprpc.so, a vendor library, and from API 31 an app's linker namespace refuses a vendor library its manifest does not name. QNN then fails to create its device - QNN_DEVICE_ERROR_INVALID_CONFIG, before it reaches the DSP - and every model ran on the CPU on 0.22.0: AI denoise took 30-131 s a photograph on the tablet. The same engine code ran on the HTP from adb's shell, whose namespace has no such rule, which is what hid it. With the declaration the app's probe chose the Hexagon on the tablet and compiled every model for it. Not required, so a device without the library still installs and runs on the CPU. A test holds the line in the manifest.
This commit is contained in:
@@ -73,6 +73,14 @@
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:supportsRtl="true">
|
||||
|
||||
<!-- The DSP's RPC library, which QNN's Hexagon stub loads. From API 31
|
||||
an app's linker namespace refuses a vendor library the manifest
|
||||
does not name, and QNN then fails to create its device
|
||||
(QNN_DEVICE_ERROR_INVALID_CONFIG) before it reaches the DSP:
|
||||
every model ran on the CPU on 0.22.0. Not required, so a device
|
||||
without one still installs and stays on the CPU. -->
|
||||
<uses-native-library android:name="libcdsprpc.so" android:required="false" />
|
||||
|
||||
<!-- NativeActivity rather than a Kotlin Activity: android-activity's
|
||||
glue loads libdarkroom.so and calls android_main. `android.app.lib_name`
|
||||
is how it learns which library to load, and must match [lib].name.
|
||||
|
||||
Reference in New Issue
Block a user