aboutsummaryrefslogtreecommitdiff
path: root/1.3
diff options
context:
space:
mode:
authorNarumol Prangnawarat <narumol.prangnawarat@arm.com>2020-06-02 12:07:43 +0100
committerNarumol Prangnawarat <narumol.prangnawarat@arm.com>2020-06-02 12:07:43 +0100
commitcad4e91027a29a62c210d422ce1c9130e46f2199 (patch)
tree5a7726242f7ee25ba6d5a549245ad52c63e4e902 /1.3
parent24a9c5847a994eb4909aecd3c551f16a69050c39 (diff)
downloadandroid-nn-driver-cad4e91027a29a62c210d422ce1c9130e46f2199.tar.gz
IVGCVSW-4780 Add QoS to AndroidNNDriver
* Add model priority to ArmnnPreparedModel_1_3 * Add RequestThread_1_3 to allow execution based on priority * Add RETIRE_RATE to Android.mk to be able to configure the retire rate Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Ic5f4309249b744c2a8f625c986eede381a26028b
Diffstat (limited to '1.3')
-rw-r--r--1.3/ArmnnDriver.hpp3
-rw-r--r--1.3/ArmnnDriverImpl.cpp6
-rw-r--r--1.3/ArmnnDriverImpl.hpp3
3 files changed, 8 insertions, 4 deletions
diff --git a/1.3/ArmnnDriver.hpp b/1.3/ArmnnDriver.hpp
index 798c4381..b6b55fae 100644
--- a/1.3/ArmnnDriver.hpp
+++ b/1.3/ArmnnDriver.hpp
@@ -206,7 +206,8 @@ public:
model,
cb,
model.relaxComputationFloat32toFloat16
- && m_Options.GetFp16Enabled());
+ && m_Options.GetFp16Enabled(),
+ priority);
}
Return<void> getSupportedExtensions(getSupportedExtensions_cb cb)
diff --git a/1.3/ArmnnDriverImpl.cpp b/1.3/ArmnnDriverImpl.cpp
index 4b2ff148..6168c9d0 100644
--- a/1.3/ArmnnDriverImpl.cpp
+++ b/1.3/ArmnnDriverImpl.cpp
@@ -101,7 +101,8 @@ Return<V1_3::ErrorStatus> ArmnnDriverImpl::prepareArmnnModel_1_3(
const DriverOptions& options,
const V1_3::Model& model,
const sp<V1_3::IPreparedModelCallback>& cb,
- bool float32ToFloat16)
+ bool float32ToFloat16,
+ V1_3::Priority priority)
{
ALOGV("ArmnnDriverImpl::prepareArmnnModel_1_3()");
@@ -204,7 +205,8 @@ Return<V1_3::ErrorStatus> ArmnnDriverImpl::prepareArmnnModel_1_3(
runtime.get(),
model,
options.GetRequestInputsAndOutputsDumpDir(),
- options.IsGpuProfilingEnabled()));
+ options.IsGpuProfilingEnabled(),
+ priority));
// Run a single 'dummy' inference of the model. This means that CL kernels will get compiled (and tuned if
// this is enabled) before the first 'real' inference which removes the overhead of the first inference.
diff --git a/1.3/ArmnnDriverImpl.hpp b/1.3/ArmnnDriverImpl.hpp
index 8a665ea5..2b39d4e0 100644
--- a/1.3/ArmnnDriverImpl.hpp
+++ b/1.3/ArmnnDriverImpl.hpp
@@ -30,7 +30,8 @@ public:
const DriverOptions& options,
const V1_3::Model& model,
const android::sp<V1_3::IPreparedModelCallback>& cb,
- bool float32ToFloat16 = false);
+ bool float32ToFloat16 = false,
+ V1_3::Priority priority = V1_3::Priority::MEDIUM);
static Return<void> getCapabilities_1_3(const armnn::IRuntimePtr& runtime,
V1_3::IDevice::getCapabilities_1_3_cb cb);