summaryrefslogtreecommitdiff
path: root/nn/driver
diff options
context:
space:
mode:
authorMiao Wang <miaowang@google.com>2020-01-21 14:59:54 -0800
committerXusong Wang <xusongw@google.com>2020-01-30 15:25:17 -0800
commit16269ba3c8fdbd3f676c80c142b039dd4ce70646 (patch)
treed8b8ef335d48286eb1474c18928331ccdd52ea55 /nn/driver
parent86426ed77c242b5523a78b690d0e18b7593a903d (diff)
downloadml-16269ba3c8fdbd3f676c80c142b039dd4ce70646.tar.gz
Update sync fence related APIs
- Allow ANeuralNetworksExecution_startComputeWithDependencies to measure execution duration after all dependencies are done. - Allow ANeuralNetworksExecution_startComputeWithDependencies to specify post-gate-release timeout duration. Bug: 142778241 Bug: 136739795 Test: mm Test: NNAPI CTS & VTS tests Change-Id: Ie32e30b7d1cb98882f3084c1741e975d3e39d970 Merged-In: Ie32e30b7d1cb98882f3084c1741e975d3e39d970 (cherry picked from commit 879701620e997b462fdbd66bc5963dba47399436)
Diffstat (limited to 'nn/driver')
-rw-r--r--nn/driver/sample/SampleDriver.cpp4
-rw-r--r--nn/driver/sample/SampleDriver.h5
2 files changed, 7 insertions, 2 deletions
diff --git a/nn/driver/sample/SampleDriver.cpp b/nn/driver/sample/SampleDriver.cpp
index 3d6690353..8f68512fa 100644
--- a/nn/driver/sample/SampleDriver.cpp
+++ b/nn/driver/sample/SampleDriver.cpp
@@ -408,7 +408,9 @@ Return<void> SamplePreparedModel::executeSynchronously_1_3(const V1_3::Request&
}
Return<void> SamplePreparedModel::executeFenced(const hal::Request&, const hidl_vec<hidl_handle>&,
- MeasureTiming, executeFenced_cb cb) {
+ MeasureTiming, const OptionalTimePoint&,
+ const OptionalTimeoutDuration&,
+ executeFenced_cb cb) {
// TODO(miaowang): implement me.
cb(ErrorStatus::DEVICE_UNAVAILABLE, hidl_handle(nullptr), nullptr);
return Void();
diff --git a/nn/driver/sample/SampleDriver.h b/nn/driver/sample/SampleDriver.h
index 4aabe9c94..a3eff5eae 100644
--- a/nn/driver/sample/SampleDriver.h
+++ b/nn/driver/sample/SampleDriver.h
@@ -139,7 +139,10 @@ class SamplePreparedModel : public hal::IPreparedModel {
configureExecutionBurst_cb cb) override;
hal::Return<void> executeFenced(const hal::Request& request,
const hal::hidl_vec<hal::hidl_handle>& wait_for,
- hal::MeasureTiming measure, executeFenced_cb callback) override;
+ hal::MeasureTiming measure,
+ const hal::OptionalTimePoint& deadline,
+ const hal::OptionalTimeoutDuration& duration,
+ executeFenced_cb callback) override;
private:
hal::Model mModel;