From cad4e91027a29a62c210d422ce1c9130e46f2199 Mon Sep 17 00:00:00 2001 From: Narumol Prangnawarat Date: Tue, 2 Jun 2020 12:07:43 +0100 Subject: 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 Change-Id: Ic5f4309249b744c2a8f625c986eede381a26028b --- ArmnnPreparedModel_1_3.hpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'ArmnnPreparedModel_1_3.hpp') diff --git a/ArmnnPreparedModel_1_3.hpp b/ArmnnPreparedModel_1_3.hpp index 4dd15c17..5010bbdb 100644 --- a/ArmnnPreparedModel_1_3.hpp +++ b/ArmnnPreparedModel_1_3.hpp @@ -7,7 +7,7 @@ #include "ArmnnDriver.hpp" #include "ArmnnDriverImpl.hpp" -#include "RequestThread.hpp" +#include "RequestThread_1_3.hpp" #include "ModelToINetworkConverter.hpp" #include @@ -50,7 +50,8 @@ public: armnn::IRuntime* runtime, const HalModel& model, const std::string& requestInputsAndOutputsDumpDir, - const bool gpuProfilingEnabled); + const bool gpuProfilingEnabled, + V1_3::Priority priority = V1_3::Priority::MEDIUM); virtual ~ArmnnPreparedModel_1_3(); @@ -105,6 +106,8 @@ public: /// \return false on failure, otherwise true bool ExecuteWithDummyInputs(); + V1_3::Priority GetModelPriority(); + private: Return Execute(const V1_3::Request& request, MeasureTiming measureTiming, @@ -135,10 +138,11 @@ private: V1_3::Model m_Model; // There must be a single RequestThread for all ArmnnPreparedModel objects to ensure serial execution of workloads // It is specific to this class, so it is declared as static here - static RequestThread m_RequestThread; + static RequestThread_1_3 m_RequestThread; uint32_t m_RequestCount; const std::string& m_RequestInputsAndOutputsDumpDir; const bool m_GpuProfilingEnabled; + V1_3::Priority m_ModelPriority; }; } -- cgit v1.2.1