diff options
Diffstat (limited to 'include/armnn')
-rw-r--r-- | include/armnn/INetwork.hpp | 14 | ||||
-rw-r--r-- | include/armnn/Version.hpp | 2 |
2 files changed, 13 insertions, 3 deletions
diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp index 2bb9ad91f3..c9c8a04656 100644 --- a/include/armnn/INetwork.hpp +++ b/include/armnn/INetwork.hpp @@ -1,5 +1,5 @@ // -// Copyright © 2017 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2017,2022 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // #pragma once @@ -98,7 +98,11 @@ public: /// Apply a visitor to this layer virtual void ExecuteStrategy(IStrategy& strategy) const = 0; - /// Provide a hint for the optimizer as to which backend to prefer for this layer + /// Provide a hint for the optimizer as to which backend to prefer for this layer. + /// By providing a BackendSelectionHint there is no guarantee the input backend supports that layer. + /// If IsLayerSupported() returns false with the backend hint, we default to calling IsLayerSupported() + /// on the BackendPreferences vector. Use SetBackendId() if we can guarantee a backend supports that + /// layer (IsLayerSupported returns true for a specific backend). virtual void BackendSelectionHint(Optional<BackendId> backend) = 0; /// Returns the armnn::LayerType of this layer @@ -111,6 +115,12 @@ public: /// the BaseDescriptor IsNull function is invoked. virtual const BaseDescriptor& GetParameters() const = 0; + /// Set the backend of the IConnectableLayer. + /// By using SetBackendId() we guarantee that the input backend supports that + /// layer (IsLayerSupported returns true for a specific backend). If there is + /// no guarantee the input backend supports that layer use BackendSelectionHint(). + virtual void SetBackendId(const BackendId& id) = 0; + using ConstantTensors = std::vector<std::reference_wrapper<std::shared_ptr<ConstTensorHandle>>>; // Returns ConstantTensors of this Layer if it has any, otherwise returns empty vector. diff --git a/include/armnn/Version.hpp b/include/armnn/Version.hpp index 7fdb20ade5..aedd4a0c0b 100644 --- a/include/armnn/Version.hpp +++ b/include/armnn/Version.hpp @@ -10,7 +10,7 @@ #define STRINGIFY_MACRO(s) #s // ArmNN version components -#define ARMNN_MAJOR_VERSION 31 +#define ARMNN_MAJOR_VERSION 32 #define ARMNN_MINOR_VERSION 0 #define ARMNN_PATCH_VERSION 0 |