diff options
author | Derek Lamberti <derek.lamberti@arm.com> | 2019-11-20 10:51:57 +0000 |
---|---|---|
committer | Derek Lamberti <derek.lamberti@arm.com> | 2019-12-09 19:20:29 +0000 |
commit | 836b27bd73d62795e82d0ce666d728c94c216067 (patch) | |
tree | c5db467b321d367eab8aaa75842f3a520c62cd17 /include/armnn/IRuntime.hpp | |
parent | fd2710651ada27fc82f28c07fb1e09effc3bda2d (diff) | |
download | armnn-836b27bd73d62795e82d0ce666d728c94c216067.tar.gz |
IVGCVSW-4157 Pass custom options directly to backends
Change-Id: I98cfb913dbd00cb94bdb5dbe82753ca147f7f671
Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
Diffstat (limited to 'include/armnn/IRuntime.hpp')
-rw-r--r-- | include/armnn/IRuntime.hpp | 33 |
1 files changed, 31 insertions, 2 deletions
diff --git a/include/armnn/IRuntime.hpp b/include/armnn/IRuntime.hpp index 08db22e4bb..49c18113b3 100644 --- a/include/armnn/IRuntime.hpp +++ b/include/armnn/IRuntime.hpp @@ -4,7 +4,7 @@ // #pragma once - +#include "BackendOptions.hpp" #include "INetwork.hpp" #include "IProfiler.hpp" #include "Tensor.hpp" @@ -73,8 +73,35 @@ public: bool m_FileOnly; uint32_t m_CapturePeriod; }; - ExternalProfilingOptions m_ProfilingOptions; + + /// Pass backend specific options. + /// + /// For example, to enable GpuAcc tuning add the following + /// m_BackendOption.emplace_back( + /// BackendOptions{"GpuAcc", + /// { + /// {"TuningLevel", 2}, + /// {"TuningFile", filename} + /// } + /// }); + /// Execute representative workloads through the runtime to generate tuning data. + /// The tuning file is written once the runtime is destroyed + + /// To execute with the tuning data, start up with just the tuning file specified. + /// m_BackendOption.emplace_back( + /// BackendOptions{"GpuAcc", + /// { + /// {"TuningFile", filename} + /// } + /// }); + + /// The following backend options are available: + /// GpuAcc: + /// "TuningLevel" : int [0..3] (0=UseOnly(default) | 1=RapidTuning | 2=NormalTuning | 3=ExhaustiveTuning) + /// "TuningFile" : string [filenameString] + /// "KernelProfilingEnabled" : bool [true | false] + std::vector<BackendOptions> m_BackendOptions; }; static IRuntime* CreateRaw(const CreationOptions& options); @@ -134,6 +161,8 @@ protected: ~IRuntime() {} }; + +/// The following API is replaced by the backend options API. using IGpuAccTunedParametersPtr = std::shared_ptr<IGpuAccTunedParameters>; /// Manages a set of GpuAcc parameters which have been tuned for maximum performance. |