summaryrefslogtreecommitdiff
path: root/nn/runtime/Manager.cpp
diff options
context:
space:
mode:
authorDavid Gross <dgross@google.com>2018-12-21 11:34:19 -0800
committerDavid Gross <dgross@google.com>2018-12-21 11:34:19 -0800
commit1120420f54c73803a9b3a03c19b34ac3ed197904 (patch)
tree37e3f0edf6751f6058e8886e8f1df0b9a4e958b2 /nn/runtime/Manager.cpp
parentcc72c1b5c7123e3f80f44288a937d6e7a1ba4495 (diff)
downloadml-1120420f54c73803a9b3a03c19b34ac3ed197904.tar.gz
Support @1.2::IPreparedModel::executeSynchronously().
- Implement SamplePreparedModel::executeSynchronously(). - Call executeSynchronously() when available. Add two more iterations to NeuralNetworksTest, in which we do not call executeSynchronously() even if it is available. Add new property debug.nn.syncexec-hal that defaults to 1. When set to 0, the runtime WILL NOT call executeSynchronously() even if it is available. Bug: 119274127 Test: NeuralNetworksTest_static Change-Id: I6d842519db732bfca057981d7abceebe69499087
Diffstat (limited to 'nn/runtime/Manager.cpp')
-rw-r--r--nn/runtime/Manager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/nn/runtime/Manager.cpp b/nn/runtime/Manager.cpp
index 63d20c3af..45df862ca 100644
--- a/nn/runtime/Manager.cpp
+++ b/nn/runtime/Manager.cpp
@@ -329,6 +329,9 @@ DeviceManager::DeviceManager() {
mPartitioning = getProp("debug.nn.partition", kPartitioningDefault);
mDebugNNCpuOnly = (getProp("debug.nn.cpuonly") != 0);
mSyncExecCpu = (getProp("debug.nn.syncexec-cpu") != 0);
+ if (!mSyncExecHalSetter) {
+ mSyncExecHal = (getProp("debug.nn.syncexec-hal", 1) != 0);
+ }
mSyncExecRuntime = (getProp("debug.nn.syncexec-runtime") != 0);
#endif // NN_DEBUGGABLE
}