Sadik Armagan | 3c24f43 | 2020-10-19 17:35:30 +0100 | [diff] [blame] | 1 | // |
Colm Donelan | 35a0689 | 2023-02-06 15:01:57 +0000 | [diff] [blame] | 2 | // Copyright © 2020-2023 Arm Ltd and Contributors. All rights reserved. |
Sadik Armagan | 3c24f43 | 2020-10-19 17:35:30 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #include <DelegateOptions.hpp> |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 7 | #include <armnn/utility/NumericCast.hpp> |
| 8 | #include <armnn/utility/StringUtils.hpp> |
Sadik Armagan | 3c24f43 | 2020-10-19 17:35:30 +0100 | [diff] [blame] | 9 | |
| 10 | namespace armnnDelegate |
| 11 | { |
| 12 | |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 13 | struct DelegateOptionsImpl |
| 14 | { |
| 15 | ~DelegateOptionsImpl() = default; |
| 16 | DelegateOptionsImpl() = default; |
| 17 | |
| 18 | explicit DelegateOptionsImpl(armnn::Compute computeDevice, |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 19 | const std::vector<armnn::BackendOptions>& backendOptions, |
| 20 | const armnn::Optional<armnn::LogSeverity> logSeverityLevel) |
| 21 | : m_Backends({computeDevice}), m_RuntimeOptions(), m_LoggingSeverity(logSeverityLevel) |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 22 | { |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 23 | m_RuntimeOptions.m_BackendOptions = backendOptions; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 24 | } |
| 25 | |
| 26 | explicit DelegateOptionsImpl(const std::vector<armnn::BackendId>& backends, |
| 27 | const std::vector<armnn::BackendOptions>& backendOptions, |
| 28 | const armnn::Optional<armnn::LogSeverity> logSeverityLevel) |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 29 | : m_Backends(backends), m_RuntimeOptions(), m_LoggingSeverity(logSeverityLevel) |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 30 | { |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 31 | m_RuntimeOptions.m_BackendOptions = backendOptions; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | explicit DelegateOptionsImpl(armnn::Compute computeDevice, |
John Mcloughlin | c5ee0d7 | 2023-03-24 12:07:25 +0000 | [diff] [blame] | 35 | const armnn::OptimizerOptionsOpaque& optimizerOptions, |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 36 | const armnn::Optional<armnn::LogSeverity>& logSeverityLevel, |
| 37 | const armnn::Optional<armnn::DebugCallbackFunction>& func) |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 38 | : m_Backends({computeDevice}), |
| 39 | m_RuntimeOptions(), |
| 40 | m_OptimizerOptions(optimizerOptions), |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 41 | m_LoggingSeverity(logSeverityLevel), |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 42 | m_DebugCallbackFunc(func) |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 43 | { |
| 44 | } |
| 45 | |
| 46 | explicit DelegateOptionsImpl(const std::vector<armnn::BackendId>& backends, |
John Mcloughlin | c5ee0d7 | 2023-03-24 12:07:25 +0000 | [diff] [blame] | 47 | const armnn::OptimizerOptionsOpaque& optimizerOptions, |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 48 | const armnn::Optional<armnn::LogSeverity>& logSeverityLevel, |
| 49 | const armnn::Optional<armnn::DebugCallbackFunction>& func) |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 50 | : m_Backends(backends), |
| 51 | m_RuntimeOptions(), |
| 52 | m_OptimizerOptions(optimizerOptions), |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 53 | m_LoggingSeverity(logSeverityLevel), |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 54 | m_DebugCallbackFunc(func) |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 55 | { |
| 56 | } |
| 57 | |
| 58 | /// Which backend to run Delegate on. |
| 59 | /// Examples of possible values are: CpuRef, CpuAcc, GpuAcc. |
| 60 | /// CpuRef as default. |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 61 | std::vector<armnn::BackendId> m_Backends = {armnn::Compute::CpuRef }; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 62 | |
| 63 | /// Creation options for the ArmNN runtime |
| 64 | /// Contains options for global settings that are valid for the whole lifetime of ArmNN |
| 65 | /// i.e. BackendOptions, DynamicBackendPath, ExternalProfilingOptions and more |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 66 | armnn::IRuntime::CreationOptions m_RuntimeOptions; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 67 | |
| 68 | /// Options for the optimization step for the network |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 69 | armnn::OptimizerOptionsOpaque m_OptimizerOptions; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 70 | |
| 71 | /// Internal profiling options. Written to INetworkProperties during model load. |
| 72 | /// Indicates whether internal profiling is enabled or not. |
| 73 | bool m_InternalProfilingEnabled = false; |
| 74 | |
| 75 | /// Sets the level of detail output by the profiling. Options are DetailsWithEvents = 1 and DetailsOnly = 2 |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 76 | armnn::ProfilingDetailsMethod m_InternalProfilingDetail = armnn::ProfilingDetailsMethod::DetailsWithEvents; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 77 | |
| 78 | /// Severity level for logging within ArmNN that will be used on creation of the delegate |
| 79 | armnn::Optional<armnn::LogSeverity> m_LoggingSeverity; |
| 80 | |
| 81 | /// A callback function to debug layers performing custom computations on intermediate tensors. |
| 82 | /// If a function is not registered, and debug is enabled in OptimizerOptions, |
| 83 | /// debug will print information of the intermediate tensors. |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 84 | armnn::Optional<armnn::DebugCallbackFunction> m_DebugCallbackFunc; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 85 | |
| 86 | /// If not empty then the optimized model will be serialized to a file with this file name in "dot" format. |
| 87 | std::string m_SerializeToDot = ""; |
| 88 | |
| 89 | /// Option to disable TfLite Runtime fallback for unsupported operators. |
| 90 | bool m_DisableTfLiteRuntimeFallback = false; |
| 91 | |
| 92 | }; |
| 93 | |
| 94 | DelegateOptions::~DelegateOptions() = default; |
| 95 | |
| 96 | DelegateOptions::DelegateOptions() |
| 97 | : p_DelegateOptionsImpl(std::make_unique<DelegateOptionsImpl>()) |
| 98 | { |
| 99 | } |
| 100 | |
| 101 | DelegateOptions::DelegateOptions(DelegateOptions const &other) |
| 102 | : p_DelegateOptionsImpl(std::make_unique<DelegateOptionsImpl>(*other.p_DelegateOptionsImpl)) |
| 103 | { |
| 104 | } |
| 105 | |
Sadik Armagan | 4189cc5 | 2020-11-11 18:01:48 +0000 | [diff] [blame] | 106 | DelegateOptions::DelegateOptions(armnn::Compute computeDevice, |
Jan Eilers | 2cd1847 | 2020-12-15 10:42:38 +0000 | [diff] [blame] | 107 | const std::vector<armnn::BackendOptions>& backendOptions, |
| 108 | const armnn::Optional<armnn::LogSeverity> logSeverityLevel) |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 109 | : p_DelegateOptionsImpl(std::make_unique<DelegateOptionsImpl>(computeDevice, backendOptions, logSeverityLevel)) |
Sadik Armagan | 3c24f43 | 2020-10-19 17:35:30 +0100 | [diff] [blame] | 110 | { |
| 111 | } |
| 112 | |
Sadik Armagan | 4189cc5 | 2020-11-11 18:01:48 +0000 | [diff] [blame] | 113 | DelegateOptions::DelegateOptions(const std::vector<armnn::BackendId>& backends, |
Jan Eilers | 2cd1847 | 2020-12-15 10:42:38 +0000 | [diff] [blame] | 114 | const std::vector<armnn::BackendOptions>& backendOptions, |
| 115 | const armnn::Optional<armnn::LogSeverity> logSeverityLevel) |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 116 | : p_DelegateOptionsImpl(std::make_unique<DelegateOptionsImpl>(backends, backendOptions, logSeverityLevel)) |
Sadik Armagan | 3c24f43 | 2020-10-19 17:35:30 +0100 | [diff] [blame] | 117 | { |
| 118 | } |
| 119 | |
Narumol Prangnawarat | 0b51d5a | 2021-01-20 15:58:29 +0000 | [diff] [blame] | 120 | DelegateOptions::DelegateOptions(armnn::Compute computeDevice, |
John Mcloughlin | c5ee0d7 | 2023-03-24 12:07:25 +0000 | [diff] [blame] | 121 | const armnn::OptimizerOptionsOpaque& optimizerOptions, |
Narumol Prangnawarat | 0b51d5a | 2021-01-20 15:58:29 +0000 | [diff] [blame] | 122 | const armnn::Optional<armnn::LogSeverity>& logSeverityLevel, |
| 123 | const armnn::Optional<armnn::DebugCallbackFunction>& func) |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 124 | : p_DelegateOptionsImpl(std::make_unique<DelegateOptionsImpl>(computeDevice, optimizerOptions, |
| 125 | logSeverityLevel, func)) |
Narumol Prangnawarat | 0b51d5a | 2021-01-20 15:58:29 +0000 | [diff] [blame] | 126 | { |
| 127 | } |
| 128 | |
| 129 | DelegateOptions::DelegateOptions(const std::vector<armnn::BackendId>& backends, |
John Mcloughlin | c5ee0d7 | 2023-03-24 12:07:25 +0000 | [diff] [blame] | 130 | const armnn::OptimizerOptionsOpaque& optimizerOptions, |
Narumol Prangnawarat | 0b51d5a | 2021-01-20 15:58:29 +0000 | [diff] [blame] | 131 | const armnn::Optional<armnn::LogSeverity>& logSeverityLevel, |
| 132 | const armnn::Optional<armnn::DebugCallbackFunction>& func) |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 133 | : p_DelegateOptionsImpl(std::make_unique<DelegateOptionsImpl>(backends, optimizerOptions, |
| 134 | logSeverityLevel, func)) |
Narumol Prangnawarat | 0b51d5a | 2021-01-20 15:58:29 +0000 | [diff] [blame] | 135 | { |
| 136 | } |
| 137 | |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 138 | DelegateOptions::DelegateOptions(char const* const* options_keys, |
| 139 | char const* const* options_values, |
| 140 | size_t num_options, |
| 141 | void (*report_error)(const char*)) |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 142 | : p_DelegateOptionsImpl(std::make_unique<DelegateOptionsImpl>()) |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 143 | { |
| 144 | armnn::IRuntime::CreationOptions runtimeOptions; |
John Mcloughlin | c5ee0d7 | 2023-03-24 12:07:25 +0000 | [diff] [blame] | 145 | armnn::OptimizerOptionsOpaque optimizerOptions; |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 146 | bool internalProfilingState = false; |
| 147 | armnn::ProfilingDetailsMethod internalProfilingDetail = armnn::ProfilingDetailsMethod::DetailsWithEvents; |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 148 | |
Teresa Charlin | 3e4b608 | 2023-10-19 19:13:29 +0100 | [diff] [blame] | 149 | // Process backends |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 150 | bool GpuAccFound = false; |
| 151 | bool CpuAccFound = false; |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 152 | for (size_t i = 0; i < num_options; ++i) |
| 153 | { |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 154 | if (std::string(options_keys[i]) == std::string("backends")) |
| 155 | { |
| 156 | // The backend option is a comma separated string of backendIDs that needs to be split |
| 157 | std::vector<armnn::BackendId> backends; |
Teresa Charlin | 3e4b608 | 2023-10-19 19:13:29 +0100 | [diff] [blame] | 158 | char *dup = strdup(options_values[i]); |
| 159 | char *pch = std::strtok(dup, ","); |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 160 | while (pch != NULL) |
| 161 | { |
| 162 | backends.push_back(pch); |
Teresa Charlin | 3e4b608 | 2023-10-19 19:13:29 +0100 | [diff] [blame] | 163 | pch = strtok(NULL, ","); |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 164 | } |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 165 | SetBackends(backends); |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 166 | GpuAccFound = std::count(GetBackends().begin(), GetBackends().end(), "GpuAcc"); |
| 167 | CpuAccFound = std::count(GetBackends().begin(), GetBackends().end(), "CpuAcc"); |
Teresa Charlin | 3e4b608 | 2023-10-19 19:13:29 +0100 | [diff] [blame] | 168 | break; |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 169 | } |
Teresa Charlin | 3e4b608 | 2023-10-19 19:13:29 +0100 | [diff] [blame] | 170 | } |
| 171 | |
| 172 | // Rest of options after knowing the backend |
| 173 | for (size_t i = 0; i < num_options; ++i) |
| 174 | { |
| 175 | if (std::string(options_keys[i]) == std::string("backends")) |
| 176 | { |
| 177 | continue; |
| 178 | } |
| 179 | // Process dynamic-backends-path |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 180 | else if (std::string(options_keys[i]) == std::string("dynamic-backends-path")) |
| 181 | { |
| 182 | runtimeOptions.m_DynamicBackendsPath = std::string(options_values[i]); |
| 183 | } |
Teresa Charlin | 3e4b608 | 2023-10-19 19:13:29 +0100 | [diff] [blame] | 184 | // Process logging level |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 185 | else if (std::string(options_keys[i]) == std::string("logging-severity")) |
| 186 | { |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 187 | SetLoggingSeverity(options_values[i]); |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 188 | } |
Teresa Charlin | 3e4b608 | 2023-10-19 19:13:29 +0100 | [diff] [blame] | 189 | // Process GPU backend options |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 190 | else if (std::string(options_keys[i]) == std::string("gpu-tuning-level")) |
| 191 | { |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 192 | if (GpuAccFound) |
| 193 | { |
| 194 | armnn::BackendOptions option("GpuAcc", {{"TuningLevel", |
| 195 | atoi(options_values[i])}}); |
| 196 | runtimeOptions.m_BackendOptions.push_back(option); |
| 197 | } |
| 198 | else |
| 199 | { |
| 200 | ARMNN_LOG(warning) << |
| 201 | "WARNING: TuningLevel is enabled, but no backends that accept this option are set."; |
| 202 | } |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 203 | } |
| 204 | else if (std::string(options_keys[i]) == std::string("gpu-mlgo-tuning-file")) |
| 205 | { |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 206 | if (GpuAccFound) |
| 207 | { |
| 208 | armnn::BackendOptions option("GpuAcc", {{"MLGOTuningFilePath", |
| 209 | std::string(options_values[i])}}); |
| 210 | optimizerOptions.AddModelOption(option); |
| 211 | } |
| 212 | else |
| 213 | { |
| 214 | ARMNN_LOG(warning) << |
| 215 | "WARNING: MLGOTuningFilePath is enabled, but no backends that accept this option are set."; |
| 216 | } |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 217 | } |
| 218 | else if (std::string(options_keys[i]) == std::string("gpu-tuning-file")) |
| 219 | { |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 220 | if (GpuAccFound) |
| 221 | { |
| 222 | armnn::BackendOptions option("GpuAcc", {{"TuningFile", |
| 223 | std::string(options_values[i])}}); |
| 224 | runtimeOptions.m_BackendOptions.push_back(option); |
| 225 | } |
| 226 | else |
| 227 | { |
| 228 | ARMNN_LOG(warning) << |
| 229 | "WARNING: TuningFile is enabled, but no backends that accept this option are set."; |
| 230 | } |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 231 | } |
| 232 | else if (std::string(options_keys[i]) == std::string("gpu-enable-profiling")) |
| 233 | { |
| 234 | runtimeOptions.m_EnableGpuProfiling = (*options_values[i] != '0'); |
| 235 | } |
| 236 | else if (std::string(options_keys[i]) == std::string("gpu-kernel-profiling-enabled")) |
| 237 | { |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 238 | if (GpuAccFound) |
| 239 | { |
| 240 | armnn::BackendOptions option("GpuAcc", {{"KernelProfilingEnabled", |
| 241 | armnn::stringUtils::StringToBool(options_values[i])}}); |
| 242 | runtimeOptions.m_BackendOptions.push_back(option); |
| 243 | } |
| 244 | else |
| 245 | { |
| 246 | ARMNN_LOG(warning) << |
| 247 | "WARNING: KernelProfilingEnabled is enabled, but no backends that accept this option are set."; |
| 248 | } |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 249 | } |
| 250 | else if (std::string(options_keys[i]) == std::string("save-cached-network")) |
| 251 | { |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 252 | if (GpuAccFound) |
| 253 | { |
| 254 | armnn::BackendOptions option("GpuAcc", {{"SaveCachedNetwork", |
| 255 | armnn::stringUtils::StringToBool(options_values[i])}}); |
| 256 | optimizerOptions.AddModelOption(option); |
| 257 | } |
| 258 | else |
| 259 | { |
| 260 | ARMNN_LOG(warning) << |
| 261 | "WARNING: SaveCachedNetwork is enabled, but no backends that accept this option are set."; |
| 262 | } |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 263 | } |
| 264 | else if (std::string(options_keys[i]) == std::string("cached-network-filepath")) |
| 265 | { |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 266 | if (GpuAccFound) |
| 267 | { |
| 268 | armnn::BackendOptions option("GpuAcc", {{"CachedNetworkFilePath", |
| 269 | std::string(options_values[i])}}); |
| 270 | optimizerOptions.AddModelOption(option); |
| 271 | } |
| 272 | else |
| 273 | { |
| 274 | ARMNN_LOG(warning) << |
| 275 | "WARNING: CachedNetworkFilePath is enabled, but no backends that accept this option are set."; |
| 276 | } |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 277 | } |
Teresa Charlin | 3e4b608 | 2023-10-19 19:13:29 +0100 | [diff] [blame] | 278 | // Process GPU & CPU backend options |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 279 | else if (std::string(options_keys[i]) == std::string("enable-fast-math")) |
| 280 | { |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 281 | if (GpuAccFound) |
| 282 | { |
| 283 | armnn::BackendOptions modelOptionGpu("GpuAcc", {{"FastMathEnabled", |
| 284 | armnn::stringUtils::StringToBool(options_values[i])}}); |
| 285 | optimizerOptions.AddModelOption(modelOptionGpu); |
| 286 | } |
| 287 | if (CpuAccFound) |
| 288 | { |
| 289 | armnn::BackendOptions modelOptionCpu("CpuAcc", {{"FastMathEnabled", |
| 290 | armnn::stringUtils::StringToBool(options_values[i])}}); |
| 291 | optimizerOptions.AddModelOption(modelOptionCpu); |
| 292 | } |
| 293 | if (!GpuAccFound and !CpuAccFound) |
| 294 | { |
| 295 | ARMNN_LOG(warning) << |
| 296 | "WARNING: Fastmath is enabled, but no backends that accept this option are set."; |
| 297 | } |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 298 | } |
Teresa Charlin | 3e4b608 | 2023-10-19 19:13:29 +0100 | [diff] [blame] | 299 | // Process CPU backend options |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 300 | else if (std::string(options_keys[i]) == std::string("number-of-threads")) |
| 301 | { |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 302 | if (CpuAccFound) |
| 303 | { |
| 304 | unsigned int numberOfThreads = armnn::numeric_cast<unsigned int>(atoi(options_values[i])); |
| 305 | armnn::BackendOptions modelOption("CpuAcc", |
| 306 | {{"NumberOfThreads", numberOfThreads}}); |
| 307 | optimizerOptions.AddModelOption(modelOption); |
| 308 | } |
| 309 | else |
| 310 | { |
| 311 | ARMNN_LOG(warning) << |
| 312 | "WARNING: NumberOfThreads is enabled, but no backends that accept this option are set."; |
| 313 | } |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 314 | } |
Teresa Charlin | 3e4b608 | 2023-10-19 19:13:29 +0100 | [diff] [blame] | 315 | // Process reduce-fp32-to-fp16 option |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 316 | else if (std::string(options_keys[i]) == std::string("reduce-fp32-to-fp16")) |
| 317 | { |
John Mcloughlin | c5ee0d7 | 2023-03-24 12:07:25 +0000 | [diff] [blame] | 318 | optimizerOptions.SetReduceFp32ToFp16(armnn::stringUtils::StringToBool(options_values[i])); |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 319 | } |
Teresa Charlin | 3e4b608 | 2023-10-19 19:13:29 +0100 | [diff] [blame] | 320 | // Process debug-data |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 321 | else if (std::string(options_keys[i]) == std::string("debug-data")) |
| 322 | { |
John Mcloughlin | c5ee0d7 | 2023-03-24 12:07:25 +0000 | [diff] [blame] | 323 | optimizerOptions.SetDebugEnabled(armnn::stringUtils::StringToBool(options_values[i])); |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 324 | } |
Teresa Charlin | 3e4b608 | 2023-10-19 19:13:29 +0100 | [diff] [blame] | 325 | // Infer output-shape |
Mike Kelly | 80512b0 | 2022-05-16 23:10:42 +0100 | [diff] [blame] | 326 | else if (std::string(options_keys[i]) == std::string("infer-output-shape")) |
| 327 | { |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 328 | if (armnn::stringUtils::StringToBool(options_values[i])) |
Mike Kelly | 80512b0 | 2022-05-16 23:10:42 +0100 | [diff] [blame] | 329 | { |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 330 | optimizerOptions.SetShapeInferenceMethod(armnn::ShapeInferenceMethod::InferAndValidate); |
| 331 | } |
| 332 | else |
| 333 | { |
| 334 | optimizerOptions.SetShapeInferenceMethod(armnn::ShapeInferenceMethod::ValidateOnly); |
| 335 | } |
Mike Kelly | 80512b0 | 2022-05-16 23:10:42 +0100 | [diff] [blame] | 336 | } |
Teresa Charlin | 3e4b608 | 2023-10-19 19:13:29 +0100 | [diff] [blame] | 337 | // Allow expanded dims |
Mike Kelly | 80512b0 | 2022-05-16 23:10:42 +0100 | [diff] [blame] | 338 | else if (std::string(options_keys[i]) == std::string("allow-expanded-dims")) |
| 339 | { |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 340 | optimizerOptions.SetAllowExpandedDims(armnn::stringUtils::StringToBool(options_values[i])); |
Mike Kelly | 80512b0 | 2022-05-16 23:10:42 +0100 | [diff] [blame] | 341 | } |
Teresa Charlin | 3e4b608 | 2023-10-19 19:13:29 +0100 | [diff] [blame] | 342 | // Process memory-import |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 343 | else if (std::string(options_keys[i]) == std::string("memory-import")) |
| 344 | { |
John Mcloughlin | c5ee0d7 | 2023-03-24 12:07:25 +0000 | [diff] [blame] | 345 | optimizerOptions.SetImportEnabled(armnn::stringUtils::StringToBool(options_values[i])); |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 346 | } |
Teresa Charlin | 3e4b608 | 2023-10-19 19:13:29 +0100 | [diff] [blame] | 347 | // Process enable-internal-profiling |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 348 | else if (std::string(options_keys[i]) == std::string("enable-internal-profiling")) |
| 349 | { |
| 350 | internalProfilingState = *options_values[i] != '0'; |
John Mcloughlin | c5ee0d7 | 2023-03-24 12:07:25 +0000 | [diff] [blame] | 351 | optimizerOptions.SetProfilingEnabled(internalProfilingState); |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 352 | } |
Teresa Charlin | 3e4b608 | 2023-10-19 19:13:29 +0100 | [diff] [blame] | 353 | // Process internal-profiling-detail |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 354 | else if (std::string(options_keys[i]) == std::string("internal-profiling-detail")) |
| 355 | { |
| 356 | uint32_t detailLevel = static_cast<uint32_t>(std::stoul(options_values[i])); |
| 357 | switch (detailLevel) |
| 358 | { |
| 359 | case 1: |
| 360 | internalProfilingDetail = armnn::ProfilingDetailsMethod::DetailsWithEvents; |
| 361 | break; |
| 362 | case 2: |
| 363 | internalProfilingDetail = armnn::ProfilingDetailsMethod::DetailsOnly; |
| 364 | break; |
| 365 | default: |
| 366 | internalProfilingDetail = armnn::ProfilingDetailsMethod::Undefined; |
| 367 | break; |
| 368 | } |
| 369 | } |
Teresa Charlin | 3e4b608 | 2023-10-19 19:13:29 +0100 | [diff] [blame] | 370 | // Process enable-external-profiling |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 371 | else if (std::string(options_keys[i]) == std::string("enable-external-profiling")) |
| 372 | { |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 373 | runtimeOptions.m_ProfilingOptions.m_EnableProfiling = armnn::stringUtils::StringToBool(options_values[i]); |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 374 | } |
Colm Donelan | 35a0689 | 2023-02-06 15:01:57 +0000 | [diff] [blame] | 375 | // Process timeline-profiling |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 376 | else if (std::string(options_keys[i]) == std::string("timeline-profiling")) |
| 377 | { |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 378 | runtimeOptions.m_ProfilingOptions.m_TimelineEnabled = armnn::stringUtils::StringToBool(options_values[i]); |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 379 | } |
Colm Donelan | 35a0689 | 2023-02-06 15:01:57 +0000 | [diff] [blame] | 380 | // Process outgoing-capture-file |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 381 | else if (std::string(options_keys[i]) == std::string("outgoing-capture-file")) |
| 382 | { |
Colm Donelan | 35a0689 | 2023-02-06 15:01:57 +0000 | [diff] [blame] | 383 | runtimeOptions.m_ProfilingOptions.m_OutgoingCaptureFile = options_values[i]; |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 384 | } |
Colm Donelan | 35a0689 | 2023-02-06 15:01:57 +0000 | [diff] [blame] | 385 | // Process incoming-capture-file |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 386 | else if (std::string(options_keys[i]) == std::string("incoming-capture-file")) |
| 387 | { |
Colm Donelan | 35a0689 | 2023-02-06 15:01:57 +0000 | [diff] [blame] | 388 | runtimeOptions.m_ProfilingOptions.m_IncomingCaptureFile = options_values[i]; |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 389 | } |
Colm Donelan | 35a0689 | 2023-02-06 15:01:57 +0000 | [diff] [blame] | 390 | // Process file-only-external-profiling |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 391 | else if (std::string(options_keys[i]) == std::string("file-only-external-profiling")) |
| 392 | { |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 393 | runtimeOptions.m_ProfilingOptions.m_FileOnly = armnn::stringUtils::StringToBool(options_values[i]); |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 394 | } |
Colm Donelan | 35a0689 | 2023-02-06 15:01:57 +0000 | [diff] [blame] | 395 | // Process counter-capture-period |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 396 | else if (std::string(options_keys[i]) == std::string("counter-capture-period")) |
| 397 | { |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 398 | runtimeOptions.m_ProfilingOptions.m_CapturePeriod = static_cast<uint32_t>(std::stoul(options_values[i])); |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 399 | } |
Colm Donelan | 35a0689 | 2023-02-06 15:01:57 +0000 | [diff] [blame] | 400 | // Process profiling-file-format |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 401 | else if (std::string(options_keys[i]) == std::string("profiling-file-format")) |
| 402 | { |
Colm Donelan | 35a0689 | 2023-02-06 15:01:57 +0000 | [diff] [blame] | 403 | runtimeOptions.m_ProfilingOptions.m_FileFormat = options_values[i]; |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 404 | } |
Colm Donelan | 35a0689 | 2023-02-06 15:01:57 +0000 | [diff] [blame] | 405 | // Process serialize-to-dot |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 406 | else if (std::string(options_keys[i]) == std::string("serialize-to-dot")) |
| 407 | { |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 408 | SetSerializeToDot(options_values[i]); |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 409 | } |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 410 | // Process disable-tflite-runtime-fallback |
Sadik Armagan | ca565c1 | 2022-08-16 12:17:24 +0100 | [diff] [blame] | 411 | else if (std::string(options_keys[i]) == std::string("disable-tflite-runtime-fallback")) |
| 412 | { |
| 413 | this->DisableTfLiteRuntimeFallback(armnn::stringUtils::StringToBool(options_values[i])); |
| 414 | } |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 415 | else |
| 416 | { |
Teresa Charlin | 19ad816 | 2023-10-04 11:17:03 +0100 | [diff] [blame] | 417 | throw armnn::Exception("Unknown option for the ArmNN Delegate given: " + std::string(options_keys[i])); |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 418 | } |
| 419 | } |
| 420 | |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 421 | SetRuntimeOptions(runtimeOptions); |
| 422 | SetOptimizerOptions(optimizerOptions); |
| 423 | SetInternalProfilingParams(internalProfilingState, internalProfilingDetail); |
Jan Eilers | f39f8d8 | 2021-10-26 16:57:34 +0100 | [diff] [blame] | 424 | } |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 425 | |
| 426 | const std::vector<armnn::BackendId>& DelegateOptions::GetBackends() const |
| 427 | { |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 428 | return p_DelegateOptionsImpl->m_Backends; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 429 | } |
| 430 | |
| 431 | void DelegateOptions::SetBackends(const std::vector<armnn::BackendId>& backends) |
| 432 | { |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 433 | p_DelegateOptionsImpl->m_Backends = backends; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 434 | } |
| 435 | |
| 436 | void DelegateOptions::SetDynamicBackendsPath(const std::string& dynamicBackendsPath) |
| 437 | { |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 438 | p_DelegateOptionsImpl->m_RuntimeOptions.m_DynamicBackendsPath = dynamicBackendsPath; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 439 | } |
| 440 | |
| 441 | const std::string& DelegateOptions::GetDynamicBackendsPath() const |
| 442 | { |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 443 | return p_DelegateOptionsImpl->m_RuntimeOptions.m_DynamicBackendsPath; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 444 | } |
| 445 | |
| 446 | void DelegateOptions::SetGpuProfilingState(bool gpuProfilingState) |
| 447 | { |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 448 | p_DelegateOptionsImpl->m_RuntimeOptions.m_EnableGpuProfiling = gpuProfilingState; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 449 | } |
| 450 | |
| 451 | bool DelegateOptions::GetGpuProfilingState() |
| 452 | { |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 453 | return p_DelegateOptionsImpl->m_RuntimeOptions.m_EnableGpuProfiling; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 454 | } |
| 455 | |
| 456 | const std::vector<armnn::BackendOptions>& DelegateOptions::GetBackendOptions() const |
| 457 | { |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 458 | return p_DelegateOptionsImpl->m_RuntimeOptions.m_BackendOptions; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 459 | } |
| 460 | |
| 461 | void DelegateOptions::AddBackendOption(const armnn::BackendOptions& option) |
| 462 | { |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 463 | p_DelegateOptionsImpl->m_RuntimeOptions.m_BackendOptions.push_back(option); |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 464 | } |
| 465 | |
| 466 | void DelegateOptions::SetLoggingSeverity(const armnn::LogSeverity& level) |
| 467 | { |
| 468 | p_DelegateOptionsImpl->m_LoggingSeverity = level; |
| 469 | } |
| 470 | |
| 471 | void DelegateOptions::SetLoggingSeverity(const std::string& level) |
| 472 | { |
| 473 | p_DelegateOptionsImpl->m_LoggingSeverity = armnn::StringToLogLevel(level); |
| 474 | } |
| 475 | |
| 476 | armnn::LogSeverity DelegateOptions::GetLoggingSeverity() |
| 477 | { |
| 478 | return p_DelegateOptionsImpl->m_LoggingSeverity.value(); |
| 479 | } |
| 480 | |
| 481 | bool DelegateOptions::IsLoggingEnabled() |
| 482 | { |
| 483 | return p_DelegateOptionsImpl->m_LoggingSeverity.has_value(); |
| 484 | } |
| 485 | |
John Mcloughlin | c5ee0d7 | 2023-03-24 12:07:25 +0000 | [diff] [blame] | 486 | const armnn::OptimizerOptionsOpaque& DelegateOptions::GetOptimizerOptions() const |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 487 | { |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 488 | return p_DelegateOptionsImpl->m_OptimizerOptions; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 489 | } |
| 490 | |
John Mcloughlin | c5ee0d7 | 2023-03-24 12:07:25 +0000 | [diff] [blame] | 491 | void DelegateOptions::SetOptimizerOptions(const armnn::OptimizerOptionsOpaque& optimizerOptions) |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 492 | { |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 493 | p_DelegateOptionsImpl->m_OptimizerOptions = optimizerOptions; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 494 | } |
| 495 | |
| 496 | const armnn::Optional<armnn::DebugCallbackFunction>& DelegateOptions::GetDebugCallbackFunction() const |
| 497 | { |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 498 | return p_DelegateOptionsImpl->m_DebugCallbackFunc; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 499 | } |
| 500 | |
| 501 | void DelegateOptions::SetInternalProfilingParams(bool internalProfilingState, |
| 502 | const armnn::ProfilingDetailsMethod& internalProfilingDetail) |
| 503 | { |
| 504 | p_DelegateOptionsImpl->m_InternalProfilingEnabled = internalProfilingState; |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 505 | p_DelegateOptionsImpl->m_InternalProfilingDetail = internalProfilingDetail; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 506 | } |
| 507 | |
| 508 | bool DelegateOptions::GetInternalProfilingState() const |
| 509 | { |
| 510 | return p_DelegateOptionsImpl->m_InternalProfilingEnabled; |
| 511 | } |
| 512 | |
| 513 | const armnn::ProfilingDetailsMethod& DelegateOptions::GetInternalProfilingDetail() const |
| 514 | { |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 515 | return p_DelegateOptionsImpl->m_InternalProfilingDetail; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 516 | } |
| 517 | |
| 518 | void DelegateOptions::SetSerializeToDot(const std::string& serializeToDotFile) |
| 519 | { |
| 520 | p_DelegateOptionsImpl->m_SerializeToDot = serializeToDotFile; |
| 521 | } |
| 522 | |
| 523 | const std::string& DelegateOptions::GetSerializeToDot() const |
| 524 | { |
| 525 | return p_DelegateOptionsImpl->m_SerializeToDot; |
| 526 | } |
| 527 | |
| 528 | void DelegateOptions::SetRuntimeOptions(const armnn::IRuntime::CreationOptions& runtimeOptions) |
| 529 | { |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 530 | p_DelegateOptionsImpl->m_RuntimeOptions = runtimeOptions; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 531 | } |
| 532 | |
| 533 | const armnn::IRuntime::CreationOptions& DelegateOptions::GetRuntimeOptions() |
| 534 | { |
Francis Murtagh | e69cbfe | 2023-05-08 15:13:47 +0100 | [diff] [blame] | 535 | return p_DelegateOptionsImpl->m_RuntimeOptions; |
John McLoughlin | 1bae865 | 2023-03-14 11:47:15 +0000 | [diff] [blame] | 536 | } |
| 537 | |
| 538 | void DelegateOptions::DisableTfLiteRuntimeFallback(bool fallbackState) |
| 539 | { |
| 540 | p_DelegateOptionsImpl->m_DisableTfLiteRuntimeFallback = fallbackState; |
| 541 | } |
| 542 | |
| 543 | bool DelegateOptions::TfLiteRuntimeFallbackDisabled() |
| 544 | { |
| 545 | return p_DelegateOptionsImpl->m_DisableTfLiteRuntimeFallback; |
| 546 | } |
| 547 | |
Sadik Armagan | 3c24f43 | 2020-10-19 17:35:30 +0100 | [diff] [blame] | 548 | } // namespace armnnDelegate |