aboutsummaryrefslogtreecommitdiff
path: root/ArmnnPreparedModel.hpp
diff options
context:
space:
mode:
authorMike Kelly <mike.kelly@arm.com>2019-07-22 14:06:00 +0100
committerMike Kelly <mike.kelly@arm.com>2019-07-22 14:06:00 +0100
commit65c42dc4d68ac163b77a3139feee3e7d4530b5c5 (patch)
treeb3ae65334c2dbfc1cc3d5a2cb336a0244b1ececc /ArmnnPreparedModel.hpp
parent9843c014726028b9082d5a9901db80b9dc519121 (diff)
downloadandroid-nn-driver-65c42dc4d68ac163b77a3139feee3e7d4530b5c5.tar.gz
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 <sadik.armagan@arm.com> Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Diffstat (limited to 'ArmnnPreparedModel.hpp')
-rw-r--r--ArmnnPreparedModel.hpp22
1 files changed, 14 insertions, 8 deletions
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<void(V1_0::ErrorStatus status, std::string callingFunction)>;
+
+struct ArmnnCallback_1_0
+{
+ armnnExecuteCallback_1_0 callback;
+};
template <typename HalVersion>
class ArmnnPreparedModel : public V1_0::IPreparedModel
@@ -39,7 +45,7 @@ public:
void ExecuteGraph(std::shared_ptr<std::vector<::android::nn::RunTimePoolInfo>>& pMemPools,
std::shared_ptr<armnn::InputTensors>& pInputTensors,
std::shared_ptr<armnn::OutputTensors>& pOutputTensors,
- const ::android::sp<V1_0::IExecutionCallback>& 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 <typename TensorBindingCollection>
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<ArmnnPreparedModel, HalVersion> m_RequestThread;
- uint32_t m_RequestCount;
- const std::string& m_RequestInputsAndOutputsDumpDir;
- const bool m_GpuProfilingEnabled;
+ static RequestThread<ArmnnPreparedModel, HalVersion, ArmnnCallback_1_0> m_RequestThread;
+ uint32_t m_RequestCount;
+ const std::string& m_RequestInputsAndOutputsDumpDir;
+ const bool m_GpuProfilingEnabled;
};
}