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:
@@ -538,6 +538,19 @@ mod tests {
|
||||
Some(value.to_string())
|
||||
}
|
||||
|
||||
/// From API 31 the linker refuses a vendor library the manifest does not
|
||||
/// name, and QNN cannot create its Hexagon device without the DSP's RPC
|
||||
/// library: 0.22.0 ran every model on the CPU for want of this line.
|
||||
#[test]
|
||||
fn the_npu_can_reach_the_dsp() {
|
||||
assert!(
|
||||
manifest().contains(
|
||||
r#"<uses-native-library android:name="libcdsprpc.so" android:required="false" />"#
|
||||
),
|
||||
"libcdsprpc.so must be declared, and not required"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_gallery_can_open_a_photograph_in_this_app() {
|
||||
let manifest = manifest();
|
||||
|
||||
Reference in New Issue
Block a user