aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/armnn/BackendHelper.hpp3
-rw-r--r--include/armnn/BackendOptions.hpp9
-rw-r--r--include/armnn/INetwork.hpp3
-rw-r--r--include/armnn/backends/IBackendInternal.hpp5
4 files changed, 20 insertions, 0 deletions
diff --git a/include/armnn/BackendHelper.hpp b/include/armnn/BackendHelper.hpp
index 0bd37dcf29..03731ac24a 100644
--- a/include/armnn/BackendHelper.hpp
+++ b/include/armnn/BackendHelper.hpp
@@ -448,4 +448,7 @@ Optional<const BackendOptions::BackendOption> GetCapability(const std::string& b
ARMNN_DEPRECATED_MSG_REMOVAL_DATE("This function has been deprecated in favour of GetBackendCapability", "22.05")
bool IsCapabilitySupported(const armnn::BackendId& backend, armnn::BackendCapability capability);
+/// Returns the number of cached files if backend supports caching
+unsigned int GetNumberOfCacheFiles(const armnn::BackendId& backend);
+
}
diff --git a/include/armnn/BackendOptions.hpp b/include/armnn/BackendOptions.hpp
index 33cecf6614..e5694493d3 100644
--- a/include/armnn/BackendOptions.hpp
+++ b/include/armnn/BackendOptions.hpp
@@ -314,4 +314,13 @@ inline std::string ParseStringBackendOption(const armnn::BackendOptions::Var& va
return defaultValue;
}
+inline int ParseIntBackendOption(const armnn::BackendOptions::Var& value, int defaultValue)
+{
+ if (value.IsInt())
+ {
+ return value.AsInt();
+ }
+ return defaultValue;
+}
+
} //namespace armnn
diff --git a/include/armnn/INetwork.hpp b/include/armnn/INetwork.hpp
index 707ae00bb3..f85b29ee81 100644
--- a/include/armnn/INetwork.hpp
+++ b/include/armnn/INetwork.hpp
@@ -722,6 +722,9 @@ public:
profiling::ProfilingGuid GetGuid() const;
+ size_t GetNumInputs() const;
+ size_t GetNumOutputs() const;
+
// Creates a copy of the IOptimizedNetwork. The IOptimizedNetwork will not be reoptimized,
// the provided ModelOptions will only be used when creating a LoadedNetwork.
IOptimizedNetwork(const IOptimizedNetwork& other, const ModelOptions& modelOptions);
diff --git a/include/armnn/backends/IBackendInternal.hpp b/include/armnn/backends/IBackendInternal.hpp
index 7500e35897..9253e11d4f 100644
--- a/include/armnn/backends/IBackendInternal.hpp
+++ b/include/armnn/backends/IBackendInternal.hpp
@@ -206,6 +206,11 @@ public:
{
throw armnn::Exception("GetDefaultAllocator: Function has not been implemented in backend.");
}
+
+ /// Returns the number of files cached if backend supports caching
+ ///
+ /// \return - Returns 0 if backend does not support caching otherwise number of files cached
+ virtual unsigned int GetNumberOfCacheFiles() const { return 0; }
};
using IBackendInternalUniquePtr = std::unique_ptr<IBackendInternal>;