From 65c42dc4d68ac163b77a3139feee3e7d4530b5c5 Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Mon, 22 Jul 2019 14:06:00 +0100 Subject: IVGCVSW-3463 Fix Hal 1.2 Dynamic Output Shape VTS test failures *Updating ArmnnPreparedModel_1_2 to work with output shapes and timing. Change-Id: I06c4ecaf1e2c36ef77a0731ece4885fc3997cd3b Signed-off-by: Sadik Armagan Signed-off-by: Mike Kelly --- ArmnnPreparedModel.hpp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'ArmnnPreparedModel.hpp') diff --git a/ArmnnPreparedModel.hpp b/ArmnnPreparedModel.hpp index 275af316..33be972f 100644 --- a/ArmnnPreparedModel.hpp +++ b/ArmnnPreparedModel.hpp @@ -17,6 +17,12 @@ namespace armnn_driver { +using armnnExecuteCallback_1_0 = std::function; + +struct ArmnnCallback_1_0 +{ + armnnExecuteCallback_1_0 callback; +}; template class ArmnnPreparedModel : public V1_0::IPreparedModel @@ -39,7 +45,7 @@ public: void ExecuteGraph(std::shared_ptr>& pMemPools, std::shared_ptr& pInputTensors, std::shared_ptr& pOutputTensors, - const ::android::sp& callback); + ArmnnCallback_1_0 callback); /// Executes this model with dummy inputs (e.g. all zeroes). /// \return false on failure, otherwise true @@ -49,15 +55,15 @@ private: template void DumpTensorsIfRequired(char const* tensorNamePrefix, const TensorBindingCollection& tensorBindings); - armnn::NetworkId m_NetworkId; - armnn::IRuntime* m_Runtime; - HalModel m_Model; + armnn::NetworkId m_NetworkId; + armnn::IRuntime* m_Runtime; + HalModel 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; - uint32_t m_RequestCount; - const std::string& m_RequestInputsAndOutputsDumpDir; - const bool m_GpuProfilingEnabled; + static RequestThread m_RequestThread; + uint32_t m_RequestCount; + const std::string& m_RequestInputsAndOutputsDumpDir; + const bool m_GpuProfilingEnabled; }; } -- cgit v1.2.1