aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2020-07-03 12:52:35 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-07-03 12:52:35 +0000
commit5949fe0b88f46eb135b896bfc3b2cddf44e02775 (patch)
tree3d6491a20c7bedc73cf6d2a2048190f29ecaad82
parent5f7fa5d19f684eb6408027fd5c057f203e5a4f43 (diff)
parent97921ca5849354d8da3c79833887b8093c905bb4 (diff)
downloadplatform_test_mlts_benchmark-5949fe0b88f46eb135b896bfc3b2cddf44e02775.tar.gz
platform_test_mlts_benchmark-5949fe0b88f46eb135b896bfc3b2cddf44e02775.tar.bz2
platform_test_mlts_benchmark-5949fe0b88f46eb135b896bfc3b2cddf44e02775.zip
Merge "Fix test failure when checking if model is supported" am: 06dbadb172 am: 97921ca584
Original change: https://android-review.googlesource.com/c/platform/test/mlts/benchmark/+/1352562 Change-Id: I6e109a74a6e6f50e850c4edaf1a50145ff7d15a4
-rw-r--r--src/com/android/nn/benchmark/core/Processor.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/android/nn/benchmark/core/Processor.java b/src/com/android/nn/benchmark/core/Processor.java
index c92a512..e74084c 100644
--- a/src/com/android/nn/benchmark/core/Processor.java
+++ b/src/com/android/nn/benchmark/core/Processor.java
@@ -133,6 +133,14 @@ public class Processor implements Runnable {
String.format("Error trying to check support for model %s on accelerator %s",
testModelEntry.mModelName, acceleratorName), e);
return false;
+ } catch (NnApiDelegationFailure nnApiDelegationFailure) {
+ if (nnApiDelegationFailure.getNnApiErrno() == 4 /*ANEURALNETWORKS_BAD_DATA*/) {
+ // Compilation will fail with ANEURALNETWORKS_BAD_DATA if the device is not
+ // supporting all operation in the model
+ return false;
+ }
+
+ throw nnApiDelegationFailure;
}
}