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
diff --git a/include/armnn/IRuntime.hpp b/include/armnn/IRuntime.hpp
index 9122089..9f70329 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 @@
virtual ~INetworkProperties() {}
};
+using namespace armnn::experimental;
+
class IRuntime
{
public:
@@ -142,6 +145,20 @@
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;