summaryrefslogtreecommitdiff
path: root/nn/runtime/test/TestPartitioningRandom.cpp
diff options
context:
space:
mode:
authorMichael Butler <butlermichael@google.com>2018-04-11 18:05:31 -0700
committerMichael Butler <butlermichael@google.com>2018-04-18 19:07:38 +0000
commitaf63a36028505cfa52f384e668f471b04ef36387 (patch)
tree4452e26bcffe8933858f4b1612a6447699d13bb7 /nn/runtime/test/TestPartitioningRandom.cpp
parent255c9967c4f2bb58f9b94b66e309423c7fe5545f (diff)
downloadml-af63a36028505cfa52f384e668f471b04ef36387.tar.gz
NNAPI: Add execution preference to prepareModel (runtime)
A model can be compiled in different ways to optimize for different use-cases. This CL propagates the execution preference across the HAL so that the NN service can better fit the users needs. Bug: 77864669 Test: mma Test: NeuralNetworksTest_static Test: VtsHalNeuralnetworksV1_1TargetTest Merged-In: I93079b18224ea10cb0a23bfbdc1ed80e302071a8 Change-Id: I93079b18224ea10cb0a23bfbdc1ed80e302071a8 (cherry picked from commit 1e9666208595bc251a8958155b1e41eca90b69db)
Diffstat (limited to 'nn/runtime/test/TestPartitioningRandom.cpp')
-rw-r--r--nn/runtime/test/TestPartitioningRandom.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/nn/runtime/test/TestPartitioningRandom.cpp b/nn/runtime/test/TestPartitioningRandom.cpp
index a72935dad..c302b133f 100644
--- a/nn/runtime/test/TestPartitioningRandom.cpp
+++ b/nn/runtime/test/TestPartitioningRandom.cpp
@@ -510,7 +510,7 @@ public:
return Void();
}
- Return<ErrorStatus> prepareModel_1_1(const HidlModel& model,
+ Return<ErrorStatus> prepareModel_1_1(const HidlModel& model, ExecutionPreference preference,
const sp<IPreparedModelCallback>& callback) override {
// NOTE: We verify that all operations in the model are supported.
ErrorStatus outStatus = ErrorStatus::INVALID_ARGUMENT;
@@ -525,7 +525,7 @@ public:
}
});
if (ret.isOk() && (outStatus == ErrorStatus::NONE)) {
- return SampleDriver::prepareModel_1_1(model, callback);
+ return SampleDriver::prepareModel_1_1(model, preference, callback);
} else {
callback->notify(ErrorStatus::INVALID_ARGUMENT, nullptr);
return ErrorStatus::INVALID_ARGUMENT;