aboutsummaryrefslogtreecommitdiff
path: root/include/armnn/IRuntime.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/armnn/IRuntime.hpp')
-rw-r--r--include/armnn/IRuntime.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/armnn/IRuntime.hpp b/include/armnn/IRuntime.hpp
index a46830c95a..ca9a0ceec2 100644
--- a/include/armnn/IRuntime.hpp
+++ b/include/armnn/IRuntime.hpp
@@ -15,6 +15,7 @@
#include "profiling/ILocalPacketHandler.hpp"
#include <armnn/backends/ICustomAllocator.hpp>
+#include <armnn/backends/IMemoryOptimizerStrategy.hpp>
#include <memory>
#include <map>
@@ -106,6 +107,7 @@ public:
, m_DynamicBackendsPath("")
, m_ProtectedMode(false)
, m_CustomAllocatorMap()
+ , m_MemoryOptimizerStrategyMap()
{}
/// If set, uses the GpuAcc tuned parameters from the given object when executing GPU workloads.
@@ -135,6 +137,14 @@ public:
/// @note Only supported for GpuAcc
std::map<BackendId, std::shared_ptr<ICustomAllocator>> m_CustomAllocatorMap;
+ /// @brief A map to define a custom memory optimizer strategy for specific backend Ids.
+ ///
+ /// @details A Memory Optimizer Strategy provides a solution to an abstract representation of
+ /// a network's memory requirements. This can also be used to return a pre-computed solution
+ /// for a specific network. Set this if you want to implement a Custom Memory Optimizer Strategy
+ /// for a given backend.
+ std::map<BackendId, std::shared_ptr<IMemoryOptimizerStrategy>> m_MemoryOptimizerStrategyMap;
+
struct ExternalProfilingOptions
{
ExternalProfilingOptions()
@@ -168,6 +178,7 @@ public:
/// {
/// {"TuningLevel", 2},
/// {"TuningFile", filename}
+ /// {"MemoryOptimizerStrategy", strategyname}
/// }
/// });
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -185,6 +196,9 @@ public:
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/// The following backend options are available:
+ /// AllBackends:
+ /// "MemoryOptimizerStrategy" : string [stategynameString]
+ /// (Existing Memory Optimizer Strategies: ConstLayerMemoryOptimizerStrategy)
/// GpuAcc:
/// "TuningLevel" : int [0..3] (0=UseOnly(default) | 1=RapidTuning | 2=NormalTuning | 3=ExhaustiveTuning)
/// "TuningFile" : string [filenameString]