aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDerek Lamberti <derek.lamberti@arm.com>2020-01-03 16:53:38 +0000
committerDerek Lamberti <derek.lamberti@arm.com>2020-03-03 14:56:00 +0000
commit4a9e24bfc51eec7e593470091fb7e6e435ae3991 (patch)
treea9be306fe10d6cd7d07fb06817c224e5e5eb8ada /include
parent9077473e0db8548506360a5196a1514f785332bb (diff)
downloadarmnn-4a9e24bfc51eec7e593470091fb7e6e435ae3991.tar.gz
IVGCVSW-4314 Per-layer backend hint API
Change-Id: I6ddcffe792e39b17fcdb8af7f13f4a689ef8019d Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
Diffstat (limited to 'include')
-rw-r--r--include/armnn/INetwork.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp
index 71eb9ff802..7f1817c5cf 100644
--- a/include/armnn/INetwork.hpp
+++ b/include/armnn/INetwork.hpp
@@ -61,22 +61,38 @@ protected:
class IConnectableLayer
{
public:
+ /// Returns the name of the layer
virtual const char* GetName() const = 0;
+ /// Returns the number of connectable input slots
virtual unsigned int GetNumInputSlots() const = 0;
+
+ /// Returns the number of connectable output slots
virtual unsigned int GetNumOutputSlots() const = 0;
+ /// Get a const input slot handle by slot index
virtual const IInputSlot& GetInputSlot(unsigned int index) const = 0;
+
+ /// Get the input slot handle by slot index
virtual IInputSlot& GetInputSlot(unsigned int index) = 0;
+ /// Get the const output slot handle by slot index
virtual const IOutputSlot& GetOutputSlot(unsigned int index) const = 0;
+
+ /// Get the output slot handle by slot index
virtual IOutputSlot& GetOutputSlot(unsigned int index) = 0;
+ /// Infer the shape of the output(s) based on the provided input shape(s)
virtual std::vector<TensorShape> InferOutputShapes(const std::vector<TensorShape>& inputShapes) const = 0;
+ /// Returns the unique id of the layer
virtual LayerGuid GetGuid() const = 0;
+ /// Apply a visitor to this layer
virtual void Accept(ILayerVisitor& visitor) const = 0;
+
+ /// Provide a hint for the optimizer as to which backend to prefer for this layer
+ virtual void BackendSelectionHint(Optional<BackendId> backend) = 0;
protected:
/// Objects are not deletable via the handle
~IConnectableLayer() {}