aboutsummaryrefslogtreecommitdiff
path: root/include/armnn/IRuntime.hpp
diff options
context:
space:
mode:
authorMike Kelly <mike.kelly@arm.com>2021-03-29 15:04:50 +0100
committermike.kelly <mike.kelly@arm.com>2021-03-29 14:03:30 +0000
commit386ff1a721cdca3689b009ba31f2d3ac8bea2fae (patch)
treee2f5c26ab2601fd0be8c1223111f55cf1ff94e6e /include/armnn/IRuntime.hpp
parent23dbe3d3ff51c2b297ce5bf6360da6552f1c3bf5 (diff)
downloadarmnn-386ff1a721cdca3689b009ba31f2d3ac8bea2fae.tar.gz
IVGCVSW-5790 Merge async prototype
* Added thread safe execution mechanism for armnn * Removed duplicate function bool Compare(T a, T b, float tolerance) * Added StridedSliceAsyncEndToEndTest * Fixed memory leak Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I2d367fc77ee7c01b8953138543e76af5e691211f
Diffstat (limited to 'include/armnn/IRuntime.hpp')
-rw-r--r--include/armnn/IRuntime.hpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/armnn/IRuntime.hpp b/include/armnn/IRuntime.hpp
index 9122089b62..9f7032914f 100644
--- a/include/armnn/IRuntime.hpp
+++ b/include/armnn/IRuntime.hpp
@@ -5,6 +5,7 @@
#pragma once
#include "BackendOptions.hpp"
+#include "IAsyncNetwork.hpp"
#include "INetwork.hpp"
#include "IProfiler.hpp"
#include "Tensor.hpp"
@@ -37,6 +38,8 @@ struct INetworkProperties
virtual ~INetworkProperties() {}
};
+using namespace armnn::experimental;
+
class IRuntime
{
public:
@@ -142,6 +145,20 @@ public:
std::string& errorMessage,
const INetworkProperties& networkProperties);
+ /// This is an experimental function.
+ /// Creates an executable network. This network is thread safe allowing for multiple networks to be
+ /// loaded simultaneously via different threads.
+ /// Note that the network is never registered with the runtime so does not need to be 'Unloaded'.
+ /// @param [out] networkIdOut Unique identifier for the network is returned in this reference.
+ /// @param [in] network Complete network to load into the IRuntime.
+ /// @param [out] errorMessage Error message if there were any errors.
+ /// @param [out] networkProperties the INetworkProperties that govern how the network should operate.
+ /// @return The IAsyncNetwork
+ std::unique_ptr<IAsyncNetwork> CreateAsyncNetwork(NetworkId& networkIdOut,
+ IOptimizedNetworkPtr network,
+ std::string& errorMessage,
+ const INetworkProperties& networkProperties);
+
TensorInfo GetInputTensorInfo(NetworkId networkId, LayerBindingId layerId) const;
TensorInfo GetOutputTensorInfo(NetworkId networkId, LayerBindingId layerId) const;