aboutsummaryrefslogtreecommitdiff
path: root/include/armnn/IRuntime.hpp
diff options
context:
space:
mode:
authorDavid Monahan <david.monahan@arm.com>2019-09-04 09:22:10 +0100
committerNarumol Prangnawarat <narumol.prangnawarat@arm.com>2019-09-16 10:41:06 +0000
commit4f1e8e47e29d42ed5862cccb29cf183853c4a86c (patch)
treed3f758b6647f3ba5a065d87ea3db4e5fc989d1bd /include/armnn/IRuntime.hpp
parent0718ee9f26219da5a1362c1060e7db3feae8b3ce (diff)
downloadarmnn-4f1e8e47e29d42ed5862cccb29cf183853c4a86c.tar.gz
IVGCVSW-3687 Add INetworkProperties to LoadNetwork
* Allows users to specify if Import/Export should be used Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: I64da26a6acbeb91ef72d31b6ccc01bb1447f624d
Diffstat (limited to 'include/armnn/IRuntime.hpp')
-rw-r--r--include/armnn/IRuntime.hpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/include/armnn/IRuntime.hpp b/include/armnn/IRuntime.hpp
index 41e1c47c5c..68965cffa5 100644
--- a/include/armnn/IRuntime.hpp
+++ b/include/armnn/IRuntime.hpp
@@ -23,6 +23,18 @@ class IGpuAccTunedParameters;
class IRuntime;
using IRuntimePtr = std::unique_ptr<IRuntime, void(*)(IRuntime* runtime)>;
+struct INetworkProperties
+{
+ INetworkProperties(bool importEnabled = false, bool exportEnabled = false)
+ : m_ImportEnabled(importEnabled),
+ m_ExportEnabled(exportEnabled) {}
+
+ const bool m_ImportEnabled;
+ const bool m_ExportEnabled;
+
+ virtual ~INetworkProperties() {}
+};
+
class IRuntime
{
public:
@@ -82,7 +94,12 @@ public:
/// @return armnn::Status
virtual Status LoadNetwork(NetworkId& networkIdOut,
IOptimizedNetworkPtr network,
- std::string & errorMessage) = 0;
+ std::string& errorMessage) = 0;
+
+ virtual Status LoadNetwork(NetworkId& networkIdOut,
+ IOptimizedNetworkPtr network,
+ std::string& errorMessage,
+ const INetworkProperties& networkProperties) = 0;
virtual TensorInfo GetInputTensorInfo(NetworkId networkId, LayerBindingId layerId) const = 0;
virtual TensorInfo GetOutputTensorInfo(NetworkId networkId, LayerBindingId layerId) const = 0;
@@ -163,4 +180,4 @@ protected:
virtual ~IGpuAccTunedParameters() {};
};
-}
+} // namespace armnn