Laurent Carlier | 749294b | 2020-06-01 09:03:17 +0100 | [diff] [blame] | 1 | // |
Jim Flynn | 6398a98 | 2020-05-27 17:05:21 +0100 | [diff] [blame] | 2 | // Copyright © 2017 Arm Ltd and Contributors. All rights reserved. |
David Beck | ecb56cd | 2018-09-05 12:52:57 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 4 | // |
| 5 | #include "Runtime.hpp" |
| 6 | |
David Beck | 056be3c | 2018-10-22 13:16:00 +0100 | [diff] [blame] | 7 | #include <armnn/Version.hpp> |
Matteo Martincigh | c601aa6 | 2019-10-29 15:03:22 +0000 | [diff] [blame] | 8 | #include <armnn/BackendRegistry.hpp> |
Jan Eilers | 15fcc7e | 2021-07-14 13:50:15 +0100 | [diff] [blame] | 9 | #include <armnn/BackendHelper.hpp> |
Matthew Bentham | f48afc6 | 2020-01-15 17:55:08 +0000 | [diff] [blame] | 10 | #include <armnn/Logging.hpp> |
alered01 | a7227ac | 2020-05-07 14:58:29 +0100 | [diff] [blame] | 11 | #include <armnn/utility/Timer.hpp> |
Matteo Martincigh | e54aa06 | 2019-08-05 14:12:11 +0100 | [diff] [blame] | 12 | |
Matteo Martincigh | e5b8eb9 | 2019-11-28 15:45:42 +0000 | [diff] [blame] | 13 | #include <armnn/backends/IBackendContext.hpp> |
Matteo Martincigh | e54aa06 | 2019-08-05 14:12:11 +0100 | [diff] [blame] | 14 | #include <backendsCommon/DynamicBackendUtils.hpp> |
Jan Eilers | bb446e5 | 2020-04-02 13:56:54 +0100 | [diff] [blame] | 15 | #include <armnn/utility/PolymorphicDowncast.hpp> |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 16 | |
Nikhil Raj | 77fe76b | 2021-06-09 14:55:32 +0100 | [diff] [blame] | 17 | #include <common/include/LabelsAndEventClasses.hpp> |
| 18 | |
surmeh01 | 3537c2c | 2018-05-18 16:31:43 +0100 | [diff] [blame] | 19 | #include <iostream> |
| 20 | |
Colm Donelan | 1aff393 | 2020-02-05 17:48:59 +0000 | [diff] [blame] | 21 | #include <backends/BackendProfiling.hpp> |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 22 | |
| 23 | using namespace armnn; |
| 24 | using namespace std; |
| 25 | |
| 26 | namespace armnn |
| 27 | { |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 28 | IRuntime::IRuntime() : pRuntimeImpl( new RuntimeImpl(armnn::IRuntime::CreationOptions())) {} |
| 29 | |
| 30 | IRuntime::IRuntime(const IRuntime::CreationOptions& options) : pRuntimeImpl(new RuntimeImpl(options)) {} |
| 31 | |
| 32 | IRuntime::~IRuntime() = default; |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 33 | |
| 34 | IRuntime* IRuntime::CreateRaw(const CreationOptions& options) |
| 35 | { |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 36 | return new IRuntime(options); |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | IRuntimePtr IRuntime::Create(const CreationOptions& options) |
| 40 | { |
| 41 | return IRuntimePtr(CreateRaw(options), &IRuntime::Destroy); |
| 42 | } |
| 43 | |
| 44 | void IRuntime::Destroy(IRuntime* runtime) |
| 45 | { |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 46 | delete runtime; |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 47 | } |
| 48 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 49 | Status IRuntime::LoadNetwork(NetworkId& networkIdOut, IOptimizedNetworkPtr network) |
| 50 | { |
| 51 | return pRuntimeImpl->LoadNetwork(networkIdOut, std::move(network)); |
| 52 | } |
| 53 | |
| 54 | Status IRuntime::LoadNetwork(NetworkId& networkIdOut, |
| 55 | IOptimizedNetworkPtr network, |
| 56 | std::string& errorMessage) |
| 57 | { |
| 58 | return pRuntimeImpl->LoadNetwork(networkIdOut, std::move(network), errorMessage); |
| 59 | } |
| 60 | |
| 61 | Status IRuntime::LoadNetwork(NetworkId& networkIdOut, |
| 62 | IOptimizedNetworkPtr network, |
| 63 | std::string& errorMessage, |
| 64 | const INetworkProperties& networkProperties) |
| 65 | { |
| 66 | return pRuntimeImpl->LoadNetwork(networkIdOut, std::move(network), errorMessage, networkProperties); |
| 67 | } |
| 68 | |
| 69 | TensorInfo IRuntime::GetInputTensorInfo(NetworkId networkId, LayerBindingId layerId) const |
| 70 | { |
| 71 | return pRuntimeImpl->GetInputTensorInfo(networkId, layerId); |
| 72 | } |
| 73 | |
| 74 | TensorInfo IRuntime::GetOutputTensorInfo(NetworkId networkId, LayerBindingId layerId) const |
| 75 | { |
| 76 | return pRuntimeImpl->GetOutputTensorInfo(networkId, layerId); |
| 77 | } |
| 78 | |
Finn Williams | f37b970 | 2021-09-01 18:06:04 +0100 | [diff] [blame^] | 79 | std::vector<ImportedInputId> IRuntime::ImportInputs(NetworkId networkId, const InputTensors& inputTensors) |
| 80 | { |
| 81 | return pRuntimeImpl->ImportInputs(networkId, inputTensors); |
| 82 | } |
| 83 | |
| 84 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 85 | Status IRuntime::EnqueueWorkload(NetworkId networkId, |
| 86 | const InputTensors& inputTensors, |
| 87 | const OutputTensors& outputTensors) |
| 88 | { |
| 89 | return pRuntimeImpl->EnqueueWorkload(networkId, inputTensors, outputTensors); |
| 90 | } |
| 91 | |
Mike Kelly | 55a8ffd | 2021-04-07 20:10:49 +0100 | [diff] [blame] | 92 | Status IRuntime::Execute(IWorkingMemHandle& workingMemHandle, |
| 93 | const InputTensors& inputTensors, |
Finn Williams | f37b970 | 2021-09-01 18:06:04 +0100 | [diff] [blame^] | 94 | const OutputTensors& outputTensors, |
| 95 | std::vector<ImportedInputId> preImportedInputs) |
Mike Kelly | 55a8ffd | 2021-04-07 20:10:49 +0100 | [diff] [blame] | 96 | { |
Finn Williams | f37b970 | 2021-09-01 18:06:04 +0100 | [diff] [blame^] | 97 | return pRuntimeImpl->Execute(workingMemHandle, inputTensors, outputTensors, preImportedInputs); |
Mike Kelly | 55a8ffd | 2021-04-07 20:10:49 +0100 | [diff] [blame] | 98 | } |
| 99 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 100 | Status IRuntime::UnloadNetwork(NetworkId networkId) |
| 101 | { |
| 102 | return pRuntimeImpl->UnloadNetwork(networkId); |
| 103 | } |
| 104 | |
| 105 | const IDeviceSpec& IRuntime::GetDeviceSpec() const |
| 106 | { |
| 107 | return pRuntimeImpl->GetDeviceSpec(); |
| 108 | } |
| 109 | |
Mike Kelly | 55a8ffd | 2021-04-07 20:10:49 +0100 | [diff] [blame] | 110 | std::unique_ptr<IWorkingMemHandle> IRuntime::CreateWorkingMemHandle(NetworkId networkId) |
| 111 | { |
| 112 | return pRuntimeImpl->CreateWorkingMemHandle(networkId); |
| 113 | } |
| 114 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 115 | const std::shared_ptr<IProfiler> IRuntime::GetProfiler(NetworkId networkId) const |
| 116 | { |
| 117 | return pRuntimeImpl->GetProfiler(networkId); |
| 118 | } |
| 119 | |
| 120 | void IRuntime::RegisterDebugCallback(NetworkId networkId, const DebugCallbackFunction& func) |
| 121 | { |
| 122 | return pRuntimeImpl->RegisterDebugCallback(networkId, func); |
| 123 | } |
| 124 | |
| 125 | int RuntimeImpl::GenerateNetworkId() |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 126 | { |
| 127 | return m_NetworkIdCounter++; |
| 128 | } |
| 129 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 130 | Status RuntimeImpl::LoadNetwork(NetworkId& networkIdOut, IOptimizedNetworkPtr inNetwork) |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 131 | { |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 132 | std::string ignoredErrorMessage; |
| 133 | return LoadNetwork(networkIdOut, std::move(inNetwork), ignoredErrorMessage); |
| 134 | } |
| 135 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 136 | Status RuntimeImpl::LoadNetwork(NetworkId& networkIdOut, |
| 137 | IOptimizedNetworkPtr inNetwork, |
| 138 | std::string& errorMessage) |
David Monahan | 4f1e8e4 | 2019-09-04 09:22:10 +0100 | [diff] [blame] | 139 | { |
Jan Eilers | c1c872f | 2021-07-22 13:17:04 +0100 | [diff] [blame] | 140 | INetworkProperties networkProperties( |
| 141 | false, MemorySource::Undefined, MemorySource::Undefined); |
David Monahan | 4f1e8e4 | 2019-09-04 09:22:10 +0100 | [diff] [blame] | 142 | return LoadNetwork(networkIdOut, std::move(inNetwork), errorMessage, networkProperties); |
| 143 | } |
| 144 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 145 | Status RuntimeImpl::LoadNetwork(NetworkId& networkIdOut, |
| 146 | IOptimizedNetworkPtr inNetwork, |
| 147 | std::string& errorMessage, |
| 148 | const INetworkProperties& networkProperties) |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 149 | { |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 150 | IOptimizedNetwork* rawNetwork = inNetwork.release(); |
David Beck | 1b61be5 | 2018-11-08 09:19:14 +0000 | [diff] [blame] | 151 | |
| 152 | networkIdOut = GenerateNetworkId(); |
| 153 | |
| 154 | for (auto&& context : m_BackendContexts) |
| 155 | { |
| 156 | context.second->BeforeLoadNetwork(networkIdOut); |
| 157 | } |
| 158 | |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 159 | unique_ptr<LoadedNetwork> loadedNetwork = LoadedNetwork::MakeLoadedNetwork( |
Francis Murtagh | 3d2b4b2 | 2021-02-15 18:23:17 +0000 | [diff] [blame] | 160 | std::unique_ptr<IOptimizedNetwork>(rawNetwork), |
David Monahan | 4f1e8e4 | 2019-09-04 09:22:10 +0100 | [diff] [blame] | 161 | errorMessage, |
Sadik Armagan | 3184c90 | 2020-03-18 10:57:30 +0000 | [diff] [blame] | 162 | networkProperties, |
Finn Williams | f364d53 | 2021-06-09 17:07:33 +0100 | [diff] [blame] | 163 | m_ProfilingService); |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 164 | |
| 165 | if (!loadedNetwork) |
| 166 | { |
| 167 | return Status::Failure; |
| 168 | } |
| 169 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 170 | { |
| 171 | std::lock_guard<std::mutex> lockGuard(m_Mutex); |
| 172 | |
| 173 | // Stores the network |
| 174 | m_LoadedNetworks[networkIdOut] = std::move(loadedNetwork); |
| 175 | } |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 176 | |
David Beck | 1b61be5 | 2018-11-08 09:19:14 +0000 | [diff] [blame] | 177 | for (auto&& context : m_BackendContexts) |
| 178 | { |
| 179 | context.second->AfterLoadNetwork(networkIdOut); |
| 180 | } |
| 181 | |
Sadik Armagan | 3184c90 | 2020-03-18 10:57:30 +0000 | [diff] [blame] | 182 | if (m_ProfilingService.IsProfilingEnabled()) |
Keith Davis | e394bd9 | 2019-12-02 15:12:19 +0000 | [diff] [blame] | 183 | { |
Sadik Armagan | 3184c90 | 2020-03-18 10:57:30 +0000 | [diff] [blame] | 184 | m_ProfilingService.IncrementCounterValue(armnn::profiling::NETWORK_LOADS); |
Keith Davis | e394bd9 | 2019-12-02 15:12:19 +0000 | [diff] [blame] | 185 | } |
| 186 | |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 187 | return Status::Success; |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 188 | } |
| 189 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 190 | Status RuntimeImpl::UnloadNetwork(NetworkId networkId) |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 191 | { |
David Beck | 1b61be5 | 2018-11-08 09:19:14 +0000 | [diff] [blame] | 192 | bool unloadOk = true; |
| 193 | for (auto&& context : m_BackendContexts) |
David Beck | 9efb57d | 2018-11-05 13:40:33 +0000 | [diff] [blame] | 194 | { |
David Beck | 1b61be5 | 2018-11-08 09:19:14 +0000 | [diff] [blame] | 195 | unloadOk &= context.second->BeforeUnloadNetwork(networkId); |
David Beck | 9efb57d | 2018-11-05 13:40:33 +0000 | [diff] [blame] | 196 | } |
David Beck | 1b61be5 | 2018-11-08 09:19:14 +0000 | [diff] [blame] | 197 | |
| 198 | if (!unloadOk) |
| 199 | { |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 200 | ARMNN_LOG(warning) << "RuntimeImpl::UnloadNetwork(): failed to unload " |
Derek Lamberti | 0844697 | 2019-11-26 16:38:31 +0000 | [diff] [blame] | 201 | "network with ID:" << networkId << " because BeforeUnloadNetwork failed"; |
David Beck | 1b61be5 | 2018-11-08 09:19:14 +0000 | [diff] [blame] | 202 | return Status::Failure; |
| 203 | } |
David Beck | 9efb57d | 2018-11-05 13:40:33 +0000 | [diff] [blame] | 204 | |
Jim Flynn | f771321 | 2020-07-14 09:50:59 +0100 | [diff] [blame] | 205 | std::unique_ptr<profiling::TimelineUtilityMethods> timelineUtils = |
| 206 | profiling::TimelineUtilityMethods::GetTimelineUtils(m_ProfilingService); |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 207 | { |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 208 | std::lock_guard<std::mutex> lockGuard(m_Mutex); |
| 209 | |
Jim Flynn | f771321 | 2020-07-14 09:50:59 +0100 | [diff] [blame] | 210 | // If timeline recording is on mark the Network end of life |
| 211 | if (timelineUtils) |
| 212 | { |
| 213 | auto search = m_LoadedNetworks.find(networkId); |
| 214 | if (search != m_LoadedNetworks.end()) |
| 215 | { |
| 216 | profiling::ProfilingGuid networkGuid = search->second->GetNetworkGuid(); |
| 217 | timelineUtils->RecordEvent(networkGuid, |
| 218 | profiling::LabelsAndEventClasses::ARMNN_PROFILING_EOL_EVENT_CLASS); |
| 219 | } |
| 220 | } |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 221 | if (m_LoadedNetworks.erase(networkId) == 0) |
| 222 | { |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 223 | ARMNN_LOG(warning) << "WARNING: RuntimeImpl::UnloadNetwork(): " << networkId << " not found!"; |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 224 | return Status::Failure; |
| 225 | } |
Sadik Armagan | 3184c90 | 2020-03-18 10:57:30 +0000 | [diff] [blame] | 226 | |
| 227 | if (m_ProfilingService.IsProfilingEnabled()) |
Keith Davis | e394bd9 | 2019-12-02 15:12:19 +0000 | [diff] [blame] | 228 | { |
Sadik Armagan | 3184c90 | 2020-03-18 10:57:30 +0000 | [diff] [blame] | 229 | m_ProfilingService.IncrementCounterValue(armnn::profiling::NETWORK_UNLOADS); |
Keith Davis | e394bd9 | 2019-12-02 15:12:19 +0000 | [diff] [blame] | 230 | } |
David Beck | 1b61be5 | 2018-11-08 09:19:14 +0000 | [diff] [blame] | 231 | } |
David Beck | 9efb57d | 2018-11-05 13:40:33 +0000 | [diff] [blame] | 232 | |
David Beck | 1b61be5 | 2018-11-08 09:19:14 +0000 | [diff] [blame] | 233 | for (auto&& context : m_BackendContexts) |
| 234 | { |
| 235 | context.second->AfterUnloadNetwork(networkId); |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 236 | } |
| 237 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 238 | ARMNN_LOG(debug) << "RuntimeImpl::UnloadNetwork(): Unloaded network with ID: " << networkId; |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 239 | return Status::Success; |
| 240 | } |
| 241 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 242 | const std::shared_ptr<IProfiler> RuntimeImpl::GetProfiler(NetworkId networkId) const |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 243 | { |
| 244 | auto it = m_LoadedNetworks.find(networkId); |
| 245 | if (it != m_LoadedNetworks.end()) |
| 246 | { |
| 247 | auto& loadedNetwork = it->second; |
| 248 | return loadedNetwork->GetProfiler(); |
| 249 | } |
| 250 | |
| 251 | return nullptr; |
| 252 | } |
| 253 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 254 | void RuntimeImpl::ReportStructure() // armnn::profiling::IProfilingService& profilingService as param |
Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 255 | { |
| 256 | // No-op for the time being, but this may be useful in future to have the profilingService available |
| 257 | // if (profilingService.IsProfilingEnabled()){} |
| 258 | |
| 259 | LoadedNetworks::iterator it = m_LoadedNetworks.begin(); |
| 260 | while (it != m_LoadedNetworks.end()) |
| 261 | { |
| 262 | auto& loadedNetwork = it->second; |
| 263 | loadedNetwork->SendNetworkStructure(); |
| 264 | // Increment the Iterator to point to next entry |
| 265 | it++; |
| 266 | } |
| 267 | } |
| 268 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 269 | RuntimeImpl::RuntimeImpl(const IRuntime::CreationOptions& options) |
Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 270 | : m_NetworkIdCounter(0), |
| 271 | m_ProfilingService(*this) |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 272 | { |
alered01 | a7227ac | 2020-05-07 14:58:29 +0100 | [diff] [blame] | 273 | const auto start_time = armnn::GetTimeNow(); |
Derek Lamberti | 0844697 | 2019-11-26 16:38:31 +0000 | [diff] [blame] | 274 | ARMNN_LOG(info) << "ArmNN v" << ARMNN_VERSION << "\n"; |
Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 275 | if ( options.m_ProfilingOptions.m_TimelineEnabled && !options.m_ProfilingOptions.m_EnableProfiling ) |
| 276 | { |
Jan Eilers | c1c872f | 2021-07-22 13:17:04 +0100 | [diff] [blame] | 277 | throw RuntimeException( |
| 278 | "It is not possible to enable timeline reporting without profiling being enabled"); |
Keith Davis | 33ed221 | 2020-03-30 10:43:41 +0100 | [diff] [blame] | 279 | } |
| 280 | |
Matteo Martincigh | e54aa06 | 2019-08-05 14:12:11 +0100 | [diff] [blame] | 281 | // Load any available/compatible dynamic backend before the runtime |
| 282 | // goes through the backend registry |
| 283 | LoadDynamicBackends(options.m_DynamicBackendsPath); |
| 284 | |
Matthew Bentham | 9a61fa6 | 2020-02-04 10:03:55 +0000 | [diff] [blame] | 285 | BackendIdSet supportedBackends; |
David Beck | 1b61be5 | 2018-11-08 09:19:14 +0000 | [diff] [blame] | 286 | for (const auto& id : BackendRegistryInstance().GetBackendIds()) |
| 287 | { |
| 288 | // Store backend contexts for the supported ones |
Matthew Bentham | 9a61fa6 | 2020-02-04 10:03:55 +0000 | [diff] [blame] | 289 | try { |
David Beck | 1b61be5 | 2018-11-08 09:19:14 +0000 | [diff] [blame] | 290 | auto factoryFun = BackendRegistryInstance().GetFactory(id); |
Colm Donelan | 380c1a0 | 2021-08-17 00:52:23 +0100 | [diff] [blame] | 291 | ARMNN_ASSERT(factoryFun != nullptr); |
David Beck | 1b61be5 | 2018-11-08 09:19:14 +0000 | [diff] [blame] | 292 | auto backend = factoryFun(); |
Colm Donelan | 380c1a0 | 2021-08-17 00:52:23 +0100 | [diff] [blame] | 293 | ARMNN_ASSERT(backend != nullptr); |
Narumol Prangnawarat | ac2770a | 2020-04-01 16:51:23 +0100 | [diff] [blame] | 294 | ARMNN_ASSERT(backend.get() != nullptr); |
David Beck | 1b61be5 | 2018-11-08 09:19:14 +0000 | [diff] [blame] | 295 | |
Jan Eilers | c1c872f | 2021-07-22 13:17:04 +0100 | [diff] [blame] | 296 | auto customAllocatorMapIterator = options.m_CustomAllocatorMap.find(id); |
Francis Murtagh | 62573b6 | 2021-08-12 11:55:21 +0100 | [diff] [blame] | 297 | if (customAllocatorMapIterator != options.m_CustomAllocatorMap.end() && |
| 298 | customAllocatorMapIterator->second == nullptr) |
| 299 | { |
Colm Donelan | 380c1a0 | 2021-08-17 00:52:23 +0100 | [diff] [blame] | 300 | // We need to manually clean up the dynamic backends before throwing an exception. |
| 301 | DynamicBackendUtils::DeregisterDynamicBackends(m_DeviceSpec.GetDynamicBackends()); |
| 302 | m_DeviceSpec.ClearDynamicBackends(); |
Francis Murtagh | 62573b6 | 2021-08-12 11:55:21 +0100 | [diff] [blame] | 303 | throw armnn::Exception("Allocator associated with id " + id.Get() + " is null"); |
| 304 | } |
Jan Eilers | c1c872f | 2021-07-22 13:17:04 +0100 | [diff] [blame] | 305 | |
Jan Eilers | 15fcc7e | 2021-07-14 13:50:15 +0100 | [diff] [blame] | 306 | // If the runtime is created in protected mode only add backends that support this mode |
| 307 | if (options.m_ProtectedMode) |
| 308 | { |
| 309 | // check if backend supports ProtectedMode |
| 310 | using BackendCapability = BackendOptions::BackendOption; |
| 311 | BackendCapability protectedContentCapability {"ProtectedContentAllocation", true}; |
| 312 | if (!HasCapability(protectedContentCapability, id)) |
| 313 | { |
| 314 | // Protected Content Allocation is not supported by the backend |
| 315 | // backend should not be registered |
| 316 | ARMNN_LOG(warning) << "Backend " |
| 317 | << id |
| 318 | << " is not registered as does not support protected content allocation \n"; |
| 319 | continue; |
| 320 | } |
Jan Eilers | c1c872f | 2021-07-22 13:17:04 +0100 | [diff] [blame] | 321 | // The user is responsible to provide a custom memory allocator which allows to allocate |
| 322 | // protected memory |
| 323 | if (customAllocatorMapIterator != options.m_CustomAllocatorMap.end()) |
Jan Eilers | 15fcc7e | 2021-07-14 13:50:15 +0100 | [diff] [blame] | 324 | { |
Jan Eilers | c1c872f | 2021-07-22 13:17:04 +0100 | [diff] [blame] | 325 | std::string err; |
| 326 | if (customAllocatorMapIterator->second->GetMemorySourceType() |
| 327 | == armnn::MemorySource::DmaBufProtected) |
| 328 | { |
| 329 | if (!backend->UseCustomMemoryAllocator(customAllocatorMapIterator->second, err)) |
| 330 | { |
| 331 | ARMNN_LOG(error) << "The backend " |
| 332 | << id |
| 333 | << " reported an error when entering protected mode. Backend won't be" |
| 334 | << " used. ErrorMsg: " << err; |
| 335 | continue; |
| 336 | } |
| 337 | // No errors so register the Custom Allocator with the BackendRegistry |
| 338 | BackendRegistryInstance().RegisterAllocator(id, customAllocatorMapIterator->second); |
| 339 | } |
| 340 | else |
| 341 | { |
| 342 | ARMNN_LOG(error) << "The CustomAllocator provided with the runtime options doesn't support " |
| 343 | "protected memory. Protected mode can't be activated. The backend " |
Jan Eilers | 15fcc7e | 2021-07-14 13:50:15 +0100 | [diff] [blame] | 344 | << id |
Jan Eilers | c1c872f | 2021-07-22 13:17:04 +0100 | [diff] [blame] | 345 | << " is not going to be used. MemorySource must be MemorySource::DmaBufProtected"; |
| 346 | continue; |
| 347 | } |
| 348 | } |
| 349 | else |
| 350 | { |
| 351 | ARMNN_LOG(error) << "Protected mode can't be activated for backend: " |
| 352 | << id |
| 353 | << " no custom allocator was provided to the runtime options."; |
Jan Eilers | 15fcc7e | 2021-07-14 13:50:15 +0100 | [diff] [blame] | 354 | continue; |
| 355 | } |
| 356 | } |
Jan Eilers | c1c872f | 2021-07-22 13:17:04 +0100 | [diff] [blame] | 357 | else |
| 358 | { |
| 359 | // If a custom memory allocator is provided make the backend use that instead of the default |
| 360 | if (customAllocatorMapIterator != options.m_CustomAllocatorMap.end()) |
| 361 | { |
| 362 | std::string err; |
| 363 | if (!backend->UseCustomMemoryAllocator(customAllocatorMapIterator->second, err)) |
| 364 | { |
| 365 | ARMNN_LOG(error) << "The backend " |
| 366 | << id |
| 367 | << " reported an error when trying to use the provided custom allocator." |
| 368 | " Backend won't be used." |
| 369 | << " ErrorMsg: " << err; |
| 370 | continue; |
| 371 | } |
| 372 | // No errors so register the Custom Allocator with the BackendRegistry |
| 373 | BackendRegistryInstance().RegisterAllocator(id, customAllocatorMapIterator->second); |
| 374 | } |
| 375 | } |
David Beck | 1b61be5 | 2018-11-08 09:19:14 +0000 | [diff] [blame] | 376 | auto context = backend->CreateBackendContext(options); |
| 377 | |
| 378 | // backends are allowed to return nullptrs if they |
| 379 | // don't wish to create a backend specific context |
| 380 | if (context) |
| 381 | { |
| 382 | m_BackendContexts.emplace(std::make_pair(id, std::move(context))); |
| 383 | } |
Matthew Bentham | 9a61fa6 | 2020-02-04 10:03:55 +0000 | [diff] [blame] | 384 | supportedBackends.emplace(id); |
Colm Donelan | 1aff393 | 2020-02-05 17:48:59 +0000 | [diff] [blame] | 385 | |
| 386 | unique_ptr<armnn::profiling::IBackendProfiling> profilingIface = |
| 387 | std::make_unique<armnn::profiling::BackendProfiling>(armnn::profiling::BackendProfiling( |
Sadik Armagan | 3184c90 | 2020-03-18 10:57:30 +0000 | [diff] [blame] | 388 | options, m_ProfilingService, id)); |
Colm Donelan | 1aff393 | 2020-02-05 17:48:59 +0000 | [diff] [blame] | 389 | |
| 390 | // Backends may also provide a profiling context. Ask for it now. |
| 391 | auto profilingContext = backend->CreateBackendProfilingContext(options, profilingIface); |
| 392 | // Backends that don't support profiling will return a null profiling context. |
| 393 | if (profilingContext) |
| 394 | { |
Finn Williams | fe5a24b | 2020-04-09 16:05:28 +0100 | [diff] [blame] | 395 | // Pass the context onto the profiling service. |
| 396 | m_ProfilingService.AddBackendProfilingContext(id, profilingContext); |
Colm Donelan | 1aff393 | 2020-02-05 17:48:59 +0000 | [diff] [blame] | 397 | } |
David Beck | 1b61be5 | 2018-11-08 09:19:14 +0000 | [diff] [blame] | 398 | } |
Matthew Bentham | 9a61fa6 | 2020-02-04 10:03:55 +0000 | [diff] [blame] | 399 | catch (const BackendUnavailableException&) |
| 400 | { |
| 401 | // Ignore backends which are unavailable |
| 402 | } |
David Beck | 1b61be5 | 2018-11-08 09:19:14 +0000 | [diff] [blame] | 403 | } |
Finn Williams | fe5a24b | 2020-04-09 16:05:28 +0100 | [diff] [blame] | 404 | |
Finn Williams | 45a7362 | 2020-05-15 18:41:05 +0100 | [diff] [blame] | 405 | BackendRegistryInstance().SetProfilingService(m_ProfilingService); |
Finn Williams | fe5a24b | 2020-04-09 16:05:28 +0100 | [diff] [blame] | 406 | // pass configuration info to the profiling service |
| 407 | m_ProfilingService.ConfigureProfilingService(options.m_ProfilingOptions); |
Jim Flynn | 6398a98 | 2020-05-27 17:05:21 +0100 | [diff] [blame] | 408 | if (options.m_ProfilingOptions.m_EnableProfiling) |
| 409 | { |
| 410 | // try to wait for the profiling service to initialise |
| 411 | m_ProfilingService.WaitForProfilingServiceActivation(3000); |
| 412 | } |
Finn Williams | fe5a24b | 2020-04-09 16:05:28 +0100 | [diff] [blame] | 413 | |
Matthew Bentham | 9a61fa6 | 2020-02-04 10:03:55 +0000 | [diff] [blame] | 414 | m_DeviceSpec.AddSupportedBackends(supportedBackends); |
alered01 | a7227ac | 2020-05-07 14:58:29 +0100 | [diff] [blame] | 415 | |
| 416 | ARMNN_LOG(info) << "Initialization time: " << std::setprecision(2) |
| 417 | << std::fixed << armnn::GetTimeDuration(start_time).count() << " ms\n"; |
surmeh01 | bceff2f | 2018-03-29 16:29:27 +0100 | [diff] [blame] | 418 | } |
| 419 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 420 | RuntimeImpl::~RuntimeImpl() |
surmeh01 | bceff2f | 2018-03-29 16:29:27 +0100 | [diff] [blame] | 421 | { |
alered01 | a7227ac | 2020-05-07 14:58:29 +0100 | [diff] [blame] | 422 | const auto start_time = armnn::GetTimeNow(); |
surmeh01 | bceff2f | 2018-03-29 16:29:27 +0100 | [diff] [blame] | 423 | std::vector<int> networkIDs; |
surmeh01 | 3537c2c | 2018-05-18 16:31:43 +0100 | [diff] [blame] | 424 | try |
| 425 | { |
| 426 | // Coverity fix: The following code may throw an exception of type std::length_error. |
| 427 | std::transform(m_LoadedNetworks.begin(), m_LoadedNetworks.end(), |
| 428 | std::back_inserter(networkIDs), |
| 429 | [](const auto &pair) { return pair.first; }); |
| 430 | } |
| 431 | catch (const std::exception& e) |
| 432 | { |
| 433 | // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an |
| 434 | // exception of type std::length_error. |
| 435 | // Using stderr instead in this context as there is no point in nesting try-catch blocks here. |
| 436 | std::cerr << "WARNING: An error has occurred when getting the IDs of the networks to unload: " << e.what() |
| 437 | << "\nSome of the loaded networks may not be unloaded" << std::endl; |
| 438 | } |
| 439 | // We then proceed to unload all the networks which IDs have been appended to the list |
| 440 | // up to the point the exception was thrown (if any). |
surmeh01 | bceff2f | 2018-03-29 16:29:27 +0100 | [diff] [blame] | 441 | |
| 442 | for (auto networkID : networkIDs) |
| 443 | { |
surmeh01 | 3537c2c | 2018-05-18 16:31:43 +0100 | [diff] [blame] | 444 | try |
| 445 | { |
| 446 | // Coverity fix: UnloadNetwork() may throw an exception of type std::length_error, |
| 447 | // boost::log::v2s_mt_posix::odr_violation or boost::log::v2s_mt_posix::system_error |
| 448 | UnloadNetwork(networkID); |
| 449 | } |
| 450 | catch (const std::exception& e) |
| 451 | { |
| 452 | // Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an |
| 453 | // exception of type std::length_error. |
| 454 | // Using stderr instead in this context as there is no point in nesting try-catch blocks here. |
| 455 | std::cerr << "WARNING: An error has occurred when unloading network " << networkID << ": " << e.what() |
| 456 | << std::endl; |
| 457 | } |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 458 | } |
Narumol Prangnawarat | 60a20fb | 2019-12-09 17:24:41 +0000 | [diff] [blame] | 459 | |
| 460 | // Clear all dynamic backends. |
| 461 | DynamicBackendUtils::DeregisterDynamicBackends(m_DeviceSpec.GetDynamicBackends()); |
| 462 | m_DeviceSpec.ClearDynamicBackends(); |
Colm Donelan | 1aff393 | 2020-02-05 17:48:59 +0000 | [diff] [blame] | 463 | m_BackendContexts.clear(); |
Finn Williams | 45a7362 | 2020-05-15 18:41:05 +0100 | [diff] [blame] | 464 | |
| 465 | BackendRegistryInstance().SetProfilingService(armnn::EmptyOptional()); |
alered01 | a7227ac | 2020-05-07 14:58:29 +0100 | [diff] [blame] | 466 | ARMNN_LOG(info) << "Shutdown time: " << std::setprecision(2) |
| 467 | << std::fixed << armnn::GetTimeDuration(start_time).count() << " ms\n"; |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 468 | } |
| 469 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 470 | LoadedNetwork* RuntimeImpl::GetLoadedNetworkPtr(NetworkId networkId) const |
surmeh01 | 3537c2c | 2018-05-18 16:31:43 +0100 | [diff] [blame] | 471 | { |
| 472 | std::lock_guard<std::mutex> lockGuard(m_Mutex); |
| 473 | return m_LoadedNetworks.at(networkId).get(); |
| 474 | } |
| 475 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 476 | TensorInfo RuntimeImpl::GetInputTensorInfo(NetworkId networkId, LayerBindingId layerId) const |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 477 | { |
surmeh01 | 3537c2c | 2018-05-18 16:31:43 +0100 | [diff] [blame] | 478 | return GetLoadedNetworkPtr(networkId)->GetInputTensorInfo(layerId); |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 479 | } |
| 480 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 481 | TensorInfo RuntimeImpl::GetOutputTensorInfo(NetworkId networkId, LayerBindingId layerId) const |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 482 | { |
surmeh01 | 3537c2c | 2018-05-18 16:31:43 +0100 | [diff] [blame] | 483 | return GetLoadedNetworkPtr(networkId)->GetOutputTensorInfo(layerId); |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 484 | } |
| 485 | |
Finn Williams | f37b970 | 2021-09-01 18:06:04 +0100 | [diff] [blame^] | 486 | std::vector<ImportedInputId> RuntimeImpl::ImportInputs(NetworkId networkId, const InputTensors& inputTensors) |
| 487 | { |
| 488 | return GetLoadedNetworkPtr(networkId)->ImportInputs(inputTensors); |
| 489 | } |
| 490 | |
| 491 | |
Derek Lamberti | 03614f6 | 2018-10-02 15:52:46 +0100 | [diff] [blame] | 492 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 493 | Status RuntimeImpl::EnqueueWorkload(NetworkId networkId, |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 494 | const InputTensors& inputTensors, |
| 495 | const OutputTensors& outputTensors) |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 496 | { |
surmeh01 | 3537c2c | 2018-05-18 16:31:43 +0100 | [diff] [blame] | 497 | LoadedNetwork* loadedNetwork = GetLoadedNetworkPtr(networkId); |
Mike Kelly | 55a8ffd | 2021-04-07 20:10:49 +0100 | [diff] [blame] | 498 | |
| 499 | if (!loadedNetwork) |
| 500 | { |
| 501 | ARMNN_LOG(error) << "A Network with an id of " << networkId << " does not exist.\n"; |
| 502 | return Status::Failure; |
| 503 | } |
| 504 | if (loadedNetwork->IsAsyncEnabled()) |
| 505 | { |
| 506 | ARMNN_LOG(error) << "Network " << networkId << " is async enabled.\n"; |
| 507 | return Status::Failure; |
| 508 | } |
Narumol Prangnawarat | 5b4d0d5 | 2020-06-23 11:45:56 +0100 | [diff] [blame] | 509 | ProfilerManager::GetInstance().RegisterProfiler(loadedNetwork->GetProfiler().get()); |
| 510 | |
| 511 | ARMNN_SCOPED_PROFILING_EVENT(Compute::Undefined, "EnqueueWorkload"); |
Derek Lamberti | 03614f6 | 2018-10-02 15:52:46 +0100 | [diff] [blame] | 512 | |
| 513 | static thread_local NetworkId lastId = networkId; |
| 514 | if (lastId != networkId) |
| 515 | { |
| 516 | LoadedNetworkFuncSafe(lastId, [](LoadedNetwork* network) |
| 517 | { |
| 518 | network->FreeWorkingMemory(); |
| 519 | }); |
| 520 | } |
| 521 | lastId=networkId; |
| 522 | |
surmeh01 | 3537c2c | 2018-05-18 16:31:43 +0100 | [diff] [blame] | 523 | return loadedNetwork->EnqueueWorkload(inputTensors, outputTensors); |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 524 | } |
| 525 | |
Mike Kelly | 55a8ffd | 2021-04-07 20:10:49 +0100 | [diff] [blame] | 526 | Status RuntimeImpl::Execute(IWorkingMemHandle& iWorkingMemHandle, |
| 527 | const InputTensors& inputTensors, |
Finn Williams | f37b970 | 2021-09-01 18:06:04 +0100 | [diff] [blame^] | 528 | const OutputTensors& outputTensors, |
| 529 | std::vector<ImportedInputId> preImportedInputs) |
Mike Kelly | 55a8ffd | 2021-04-07 20:10:49 +0100 | [diff] [blame] | 530 | { |
| 531 | NetworkId networkId = iWorkingMemHandle.GetNetworkId(); |
| 532 | LoadedNetwork* loadedNetwork = GetLoadedNetworkPtr(networkId); |
| 533 | |
| 534 | if (!loadedNetwork) |
| 535 | { |
| 536 | ARMNN_LOG(error) << "A Network with an id of " << networkId << " does not exist.\n"; |
| 537 | return Status::Failure; |
| 538 | } |
| 539 | if (!loadedNetwork->IsAsyncEnabled()) |
| 540 | { |
Keith Davis | e813d67 | 2021-04-22 10:10:34 +0100 | [diff] [blame] | 541 | ARMNN_LOG(error) << "Attempting execute " << networkId << " when it is not async enabled.\n"; |
Mike Kelly | 55a8ffd | 2021-04-07 20:10:49 +0100 | [diff] [blame] | 542 | return Status::Failure; |
| 543 | } |
| 544 | ProfilerManager::GetInstance().RegisterProfiler(loadedNetwork->GetProfiler().get()); |
| 545 | |
| 546 | ARMNN_SCOPED_PROFILING_EVENT(Compute::Undefined, "Execute"); |
| 547 | |
Finn Williams | f37b970 | 2021-09-01 18:06:04 +0100 | [diff] [blame^] | 548 | return loadedNetwork->Execute(inputTensors, outputTensors, iWorkingMemHandle, preImportedInputs); |
Mike Kelly | 55a8ffd | 2021-04-07 20:10:49 +0100 | [diff] [blame] | 549 | } |
| 550 | |
| 551 | /// Create a new unique WorkingMemHandle object. Create multiple handles if you wish to have |
| 552 | /// overlapped Execution by calling this function from different threads. |
| 553 | std::unique_ptr<IWorkingMemHandle> RuntimeImpl::CreateWorkingMemHandle(NetworkId networkId) |
| 554 | { |
| 555 | LoadedNetwork* loadedNetwork = GetLoadedNetworkPtr(networkId); |
| 556 | |
| 557 | if (!loadedNetwork) |
| 558 | { |
| 559 | ARMNN_LOG(error) << "A Network with an id of " << networkId << " does not exist.\n"; |
| 560 | return nullptr; |
| 561 | } |
| 562 | if (!loadedNetwork->IsAsyncEnabled()) |
| 563 | { |
| 564 | ARMNN_LOG(error) << "Network " << networkId << " is not async enabled.\n"; |
| 565 | return nullptr; |
| 566 | } |
| 567 | ProfilerManager::GetInstance().RegisterProfiler(loadedNetwork->GetProfiler().get()); |
| 568 | |
| 569 | ARMNN_SCOPED_PROFILING_EVENT(Compute::Undefined, "CreateWorkingMemHandle"); |
| 570 | |
| 571 | static thread_local NetworkId lastId = networkId; |
| 572 | if (lastId != networkId) |
| 573 | { |
| 574 | LoadedNetworkFuncSafe(lastId, [](LoadedNetwork* network) |
| 575 | { |
| 576 | network->FreeWorkingMemory(); |
| 577 | }); |
| 578 | } |
| 579 | lastId=networkId; |
| 580 | |
| 581 | return loadedNetwork->CreateWorkingMemHandle(networkId); |
| 582 | } |
| 583 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 584 | void RuntimeImpl::RegisterDebugCallback(NetworkId networkId, const DebugCallbackFunction& func) |
Nattapat Chaimanowong | 6e94820 | 2019-03-22 14:01:46 +0000 | [diff] [blame] | 585 | { |
| 586 | LoadedNetwork* loadedNetwork = GetLoadedNetworkPtr(networkId); |
| 587 | loadedNetwork->RegisterDebugCallback(func); |
| 588 | } |
| 589 | |
Kevin May | d92a6e4 | 2021-02-04 10:27:41 +0000 | [diff] [blame] | 590 | void RuntimeImpl::LoadDynamicBackends(const std::string& overrideBackendPath) |
Matteo Martincigh | e54aa06 | 2019-08-05 14:12:11 +0100 | [diff] [blame] | 591 | { |
| 592 | // Get the paths where to load the dynamic backends from |
| 593 | std::vector<std::string> backendPaths = DynamicBackendUtils::GetBackendPaths(overrideBackendPath); |
| 594 | |
| 595 | // Get the shared objects to try to load as dynamic backends |
| 596 | std::vector<std::string> sharedObjects = DynamicBackendUtils::GetSharedObjects(backendPaths); |
| 597 | |
| 598 | // Create a list of dynamic backends |
Matteo Martincigh | 0c2b289 | 2019-08-05 14:12:11 +0100 | [diff] [blame] | 599 | m_DynamicBackends = DynamicBackendUtils::CreateDynamicBackends(sharedObjects); |
| 600 | |
| 601 | // Register the dynamic backends in the backend registry |
Matteo Martincigh | 8953390 | 2019-08-15 12:08:06 +0100 | [diff] [blame] | 602 | BackendIdSet registeredBackendIds = DynamicBackendUtils::RegisterDynamicBackends(m_DynamicBackends); |
| 603 | |
| 604 | // Add the registered dynamic backend ids to the list of supported backends |
Narumol Prangnawarat | 60a20fb | 2019-12-09 17:24:41 +0000 | [diff] [blame] | 605 | m_DeviceSpec.AddSupportedBackends(registeredBackendIds, true); |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 606 | } |
Matteo Martincigh | e54aa06 | 2019-08-05 14:12:11 +0100 | [diff] [blame] | 607 | |
| 608 | } // namespace armnn |