summaryrefslogtreecommitdiff
path: root/neuralnetworks/1.2/utils/src/ExecutionBurstController.cpp
diff options
context:
space:
mode:
authorMichael Butler <butlermichael@google.com>2021-04-05 23:03:27 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-04-05 23:03:27 +0000
commitae25708fa2f2bf806be84cacefee5cec190a2ccc (patch)
treed61591882ad84eff4b38e3cbbbc4f246a35ec18e /neuralnetworks/1.2/utils/src/ExecutionBurstController.cpp
parent564f4060167b5886d2f712d1ec2321846de651fd (diff)
parenta4efef4f0ea4e365c3b4816bd25455aceea25e96 (diff)
Add additional parameters for NN Burst -- HAL am: 8414a6ebf9 am: b19c1cbef3 am: a4efef4f0e
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1663920 Change-Id: Ic2baef0c456783024bca24cc6d53717934806653
Diffstat (limited to 'neuralnetworks/1.2/utils/src/ExecutionBurstController.cpp')
-rw-r--r--neuralnetworks/1.2/utils/src/ExecutionBurstController.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/neuralnetworks/1.2/utils/src/ExecutionBurstController.cpp b/neuralnetworks/1.2/utils/src/ExecutionBurstController.cpp
index eedf5916bc..7a17f257c2 100644
--- a/neuralnetworks/1.2/utils/src/ExecutionBurstController.cpp
+++ b/neuralnetworks/1.2/utils/src/ExecutionBurstController.cpp
@@ -276,7 +276,9 @@ ExecutionBurstController::OptionalCacheHold ExecutionBurstController::cacheMemor
}
nn::ExecutionResult<std::pair<std::vector<nn::OutputShape>, nn::Timing>>
-ExecutionBurstController::execute(const nn::Request& request, nn::MeasureTiming measure) const {
+ExecutionBurstController::execute(const nn::Request& request, nn::MeasureTiming measure,
+ const nn::OptionalTimePoint& deadline,
+ const nn::OptionalDuration& loopTimeoutDuration) const {
// This is the first point when we know an execution is occurring, so begin to collect
// systraces. Note that the first point we can begin collecting systraces in
// ExecutionBurstServer is when the RequestChannelReceiver realizes there is data in the FMQ, so
@@ -289,7 +291,7 @@ ExecutionBurstController::execute(const nn::Request& request, nn::MeasureTiming
version > nn::Version::ANDROID_Q) {
// fallback to another execution path if the packet could not be sent
if (kFallback) {
- return kFallback(request, measure);
+ return kFallback(request, measure, deadline, loopTimeoutDuration);
}
return NN_ERROR() << "Request object has features not supported by IBurst::execute";
}
@@ -323,7 +325,7 @@ ExecutionBurstController::execute(const nn::Request& request, nn::MeasureTiming
if (!sendStatus.ok()) {
// fallback to another execution path if the packet could not be sent
if (kFallback) {
- return kFallback(request, measure);
+ return kFallback(request, measure, deadline, loopTimeoutDuration);
}
return NN_ERROR() << "Error sending FMQ packet: " << sendStatus.error();
}