blob: a7df499ce36c87edc2eecdadd3e3d648a55edb76 [file] [log] [blame]
telsoa015307bc12018-03-09 13:51:08 +00001//
2// Copyright © 2017 Arm Ltd. All rights reserved.
David Beck93e48982018-09-05 13:05:09 +01003// SPDX-License-Identifier: MIT
telsoa015307bc12018-03-09 13:51:08 +00004//
5
6#define LOG_TAG "ArmnnDriver"
7
8#include "Utils.hpp"
Jim Flynnf2e175c2019-12-12 15:11:30 +00009#include "Half.hpp"
telsoa015307bc12018-03-09 13:51:08 +000010
Matteo Martincigh00d6ed12019-11-28 17:13:24 +000011#include <armnnUtils/Permute.hpp>
12
Derek Lambertid00ad912020-01-22 15:55:16 +000013#include <armnn/Utils.hpp>
Narumol Prangnawarat4d07e5e2020-04-06 16:46:21 +010014#include <armnn/utility/Assert.hpp>
Derek Lambertid00ad912020-01-22 15:55:16 +000015
telsoa015307bc12018-03-09 13:51:08 +000016#include <cassert>
Jim Flynn829ad302019-12-13 14:43:24 +000017#include <cerrno>
telsoa015307bc12018-03-09 13:51:08 +000018#include <cinttypes>
Jim Flynn829ad302019-12-13 14:43:24 +000019#include <sstream>
20#include <cstdio>
21#include <time.h>
22
23
telsoa015307bc12018-03-09 13:51:08 +000024
25using namespace android;
telsoa01ce3e84a2018-08-31 09:31:35 +010026using namespace android::hardware;
telsoa015307bc12018-03-09 13:51:08 +000027using namespace android::hidl::memory::V1_0;
28
29namespace armnn_driver
30{
31const armnn::PermutationVector g_DontPermute{};
32
33namespace
34{
35
telsoa015307bc12018-03-09 13:51:08 +000036void SwizzleAndroidNn4dTensorToArmNn(const armnn::TensorShape& inTensorShape, const void* input,
Matteo Martincighbf19d2a2019-11-29 11:46:50 +000037 void* output, size_t dataTypeSize, const armnn::PermutationVector& mappings)
telsoa015307bc12018-03-09 13:51:08 +000038{
Matteo Martincighbf19d2a2019-11-29 11:46:50 +000039 assert(inTensorShape.GetNumDimensions() == 4U);
telsoa015307bc12018-03-09 13:51:08 +000040
Matteo Martincighbf19d2a2019-11-29 11:46:50 +000041 armnnUtils::Permute(armnnUtils::Permuted(inTensorShape, mappings), mappings, input, output, dataTypeSize);
telsoa015307bc12018-03-09 13:51:08 +000042}
43
44} // anonymous namespace
45
46void SwizzleAndroidNn4dTensorToArmNn(const armnn::TensorInfo& tensor, const void* input, void* output,
47 const armnn::PermutationVector& mappings)
48{
49 assert(tensor.GetNumDimensions() == 4U);
50
Matteo Martincighbf19d2a2019-11-29 11:46:50 +000051 armnn::DataType dataType = tensor.GetDataType();
52 switch (dataType)
telsoa015307bc12018-03-09 13:51:08 +000053 {
Mike Kelly3c673942019-07-25 09:26:06 +010054 case armnn::DataType::Float16:
telsoa015307bc12018-03-09 13:51:08 +000055 case armnn::DataType::Float32:
Derek Lamberti1a38cda2020-01-10 17:28:20 +000056 case armnn::DataType::QAsymmU8:
Derek Lambertid00ad912020-01-22 15:55:16 +000057 case armnn::DataType::QSymmS8:
Sadik Armagan1153d1e2020-04-01 15:09:39 +010058 case armnn::DataType::QAsymmS8:
Matteo Martincighbf19d2a2019-11-29 11:46:50 +000059 SwizzleAndroidNn4dTensorToArmNn(tensor.GetShape(), input, output, armnn::GetDataTypeSize(dataType), mappings);
Aron Virginas-Tar9f0693b2019-11-06 14:32:30 +000060 break;
telsoa015307bc12018-03-09 13:51:08 +000061 default:
62 ALOGW("Unknown armnn::DataType for swizzling");
63 assert(0);
64 }
65}
66
67void* GetMemoryFromPool(DataLocation location, const std::vector<android::nn::RunTimePoolInfo>& memPools)
68{
69 // find the location within the pool
70 assert(location.poolIndex < memPools.size());
71
surmeh01deb3bdb2018-07-05 12:06:04 +010072 const android::nn::RunTimePoolInfo& memPool = memPools[location.poolIndex];
73
surmeh01deb3bdb2018-07-05 12:06:04 +010074 uint8_t* memPoolBuffer = memPool.getBuffer();
surmeh01deb3bdb2018-07-05 12:06:04 +010075
76 uint8_t* memory = memPoolBuffer + location.offset;
telsoa015307bc12018-03-09 13:51:08 +000077
78 return memory;
79}
80
Matthew Bentham912b3622019-05-03 15:49:14 +010081armnn::TensorInfo GetTensorInfoForOperand(const V1_0::Operand& operand)
telsoa015307bc12018-03-09 13:51:08 +000082{
83 armnn::DataType type;
84
85 switch (operand.type)
86 {
Matthew Bentham912b3622019-05-03 15:49:14 +010087 case V1_0::OperandType::TENSOR_FLOAT32:
telsoa015307bc12018-03-09 13:51:08 +000088 type = armnn::DataType::Float32;
89 break;
Matthew Bentham912b3622019-05-03 15:49:14 +010090 case V1_0::OperandType::TENSOR_QUANT8_ASYMM:
Derek Lamberti1a38cda2020-01-10 17:28:20 +000091 type = armnn::DataType::QAsymmU8;
telsoa015307bc12018-03-09 13:51:08 +000092 break;
Matthew Bentham912b3622019-05-03 15:49:14 +010093 case V1_0::OperandType::TENSOR_INT32:
telsoa015307bc12018-03-09 13:51:08 +000094 type = armnn::DataType::Signed32;
95 break;
96 default:
Mike Kellyb5fdf382019-06-11 16:35:25 +010097 throw UnsupportedOperand<V1_0::OperandType>(operand.type);
telsoa015307bc12018-03-09 13:51:08 +000098 }
99
100 armnn::TensorInfo ret(operand.dimensions.size(), operand.dimensions.data(), type);
101
102 ret.SetQuantizationScale(operand.scale);
103 ret.SetQuantizationOffset(operand.zeroPoint);
104
105 return ret;
106}
107
Kevin May42477c12020-03-26 13:34:14 +0000108#if defined(ARMNN_ANDROID_NN_V1_2) || defined(ARMNN_ANDROID_NN_V1_3)// Using ::android::hardware::neuralnetworks::V1_2
Mike Kellyb5fdf382019-06-11 16:35:25 +0100109
110armnn::TensorInfo GetTensorInfoForOperand(const V1_2::Operand& operand)
111{
Aron Virginas-Tar9f0693b2019-11-06 14:32:30 +0000112 using namespace armnn;
Derek Lambertid00ad912020-01-22 15:55:16 +0000113 bool perChannel = false;
Mike Kellyb5fdf382019-06-11 16:35:25 +0100114
Aron Virginas-Tar9f0693b2019-11-06 14:32:30 +0000115 DataType type;
Mike Kellyb5fdf382019-06-11 16:35:25 +0100116 switch (operand.type)
117 {
Sadik Armagan793a70c2020-03-19 13:54:04 +0000118 case V1_2::OperandType::TENSOR_BOOL8:
119 type = armnn::DataType::Boolean;
120 break;
Mike Kellyb5fdf382019-06-11 16:35:25 +0100121 case V1_2::OperandType::TENSOR_FLOAT32:
122 type = armnn::DataType::Float32;
123 break;
Mike Kelly3c673942019-07-25 09:26:06 +0100124 case V1_2::OperandType::TENSOR_FLOAT16:
125 type = armnn::DataType::Float16;
126 break;
Mike Kellyb5fdf382019-06-11 16:35:25 +0100127 case V1_2::OperandType::TENSOR_QUANT8_ASYMM:
Derek Lamberti1a38cda2020-01-10 17:28:20 +0000128 type = armnn::DataType::QAsymmU8;
Mike Kellyb5fdf382019-06-11 16:35:25 +0100129 break;
Derek Lambertid00ad912020-01-22 15:55:16 +0000130 case V1_2::OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL:
131 perChannel=true;
132 ARMNN_FALLTHROUGH;
Mike Kelly0e2e31b2019-11-19 09:16:00 +0000133 case V1_2::OperandType::TENSOR_QUANT8_SYMM:
FinnWilliamsArm624fe9f2019-12-06 17:12:42 +0000134 type = armnn::DataType::QSymmS8;
Mike Kelly0e2e31b2019-11-19 09:16:00 +0000135 break;
Mike Kellyb5fdf382019-06-11 16:35:25 +0100136 case V1_2::OperandType::TENSOR_QUANT16_SYMM:
Derek Lamberti1a38cda2020-01-10 17:28:20 +0000137 type = armnn::DataType::QSymmS16;
Mike Kellyb5fdf382019-06-11 16:35:25 +0100138 break;
139 case V1_2::OperandType::TENSOR_INT32:
140 type = armnn::DataType::Signed32;
141 break;
142 default:
143 throw UnsupportedOperand<V1_2::OperandType>(operand.type);
144 }
145
Aron Virginas-Tar9f0693b2019-11-06 14:32:30 +0000146 TensorInfo ret(operand.dimensions.size(), operand.dimensions.data(), type);
Derek Lambertid00ad912020-01-22 15:55:16 +0000147 if (perChannel)
Aron Virginas-Tar9f0693b2019-11-06 14:32:30 +0000148 {
149 // ExtraParams is expected to be of type channelQuant
Narumol Prangnawarat4d07e5e2020-04-06 16:46:21 +0100150 ARMNN_ASSERT(operand.extraParams.getDiscriminator() ==
Aron Virginas-Tar9f0693b2019-11-06 14:32:30 +0000151 V1_2::Operand::ExtraParams::hidl_discriminator::channelQuant);
Mike Kellyb5fdf382019-06-11 16:35:25 +0100152
Aron Virginas-Tar9f0693b2019-11-06 14:32:30 +0000153 auto perAxisQuantParams = operand.extraParams.channelQuant();
154
155 ret.SetQuantizationScales(perAxisQuantParams.scales);
156 ret.SetQuantizationDim(MakeOptional<unsigned int>(perAxisQuantParams.channelDim));
157 }
158 else
159 {
160 ret.SetQuantizationScale(operand.scale);
161 ret.SetQuantizationOffset(operand.zeroPoint);
162 }
Mike Kellyb5fdf382019-06-11 16:35:25 +0100163
164 return ret;
165}
166
167#endif
168
Kevin May42477c12020-03-26 13:34:14 +0000169#ifdef ARMNN_ANDROID_NN_V1_3 // Using ::android::hardware::neuralnetworks::V1_3
170
171armnn::TensorInfo GetTensorInfoForOperand(const V1_3::Operand& operand)
172{
173 using namespace armnn;
174 bool perChannel = false;
175
176 DataType type;
177 switch (operand.type)
178 {
Sadik Armagan51ba2c62020-03-31 15:36:25 +0100179 case V1_3::OperandType::TENSOR_BOOL8:
180 type = armnn::DataType::Boolean;
181 break;
Kevin May42477c12020-03-26 13:34:14 +0000182 case V1_3::OperandType::TENSOR_FLOAT32:
183 type = armnn::DataType::Float32;
184 break;
185 case V1_3::OperandType::TENSOR_FLOAT16:
186 type = armnn::DataType::Float16;
187 break;
188 case V1_3::OperandType::TENSOR_QUANT8_ASYMM:
189 type = armnn::DataType::QAsymmU8;
190 break;
191 case V1_3::OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL:
192 perChannel=true;
193 ARMNN_FALLTHROUGH;
194 case V1_3::OperandType::TENSOR_QUANT8_SYMM:
195 type = armnn::DataType::QSymmS8;
196 break;
197 case V1_3::OperandType::TENSOR_QUANT16_SYMM:
198 type = armnn::DataType::QSymmS16;
199 break;
200 case V1_3::OperandType::TENSOR_INT32:
201 type = armnn::DataType::Signed32;
202 break;
203 case V1_3::OperandType::TENSOR_QUANT8_ASYMM_SIGNED:
204 type = armnn::DataType::QAsymmS8;
205 break;
206 default:
207 throw UnsupportedOperand<V1_3::OperandType>(operand.type);
208 }
209
210 TensorInfo ret(operand.dimensions.size(), operand.dimensions.data(), type);
211 if (perChannel)
212 {
213 // ExtraParams is expected to be of type channelQuant
Narumol Prangnawarat4d07e5e2020-04-06 16:46:21 +0100214 ARMNN_ASSERT(operand.extraParams.getDiscriminator() ==
Kevin May352d8382020-03-31 15:03:42 +0100215 V1_2::Operand::ExtraParams::hidl_discriminator::channelQuant);
Kevin May42477c12020-03-26 13:34:14 +0000216
217 auto perAxisQuantParams = operand.extraParams.channelQuant();
218
219 ret.SetQuantizationScales(perAxisQuantParams.scales);
220 ret.SetQuantizationDim(MakeOptional<unsigned int>(perAxisQuantParams.channelDim));
221 }
222 else
223 {
224 ret.SetQuantizationScale(operand.scale);
225 ret.SetQuantizationOffset(operand.zeroPoint);
226 }
227
228 return ret;
229}
230
231#endif
232
Matthew Bentham912b3622019-05-03 15:49:14 +0100233std::string GetOperandSummary(const V1_0::Operand& operand)
telsoa015307bc12018-03-09 13:51:08 +0000234{
235 return android::hardware::details::arrayToString(operand.dimensions, operand.dimensions.size()) + " " +
236 toString(operand.type);
237}
238
Kevin May42477c12020-03-26 13:34:14 +0000239#if defined(ARMNN_ANDROID_NN_V1_2) || defined(ARMNN_ANDROID_NN_V1_3) // Using ::android::hardware::neuralnetworks::V1_2
Mike Kellyb5fdf382019-06-11 16:35:25 +0100240
241std::string GetOperandSummary(const V1_2::Operand& operand)
242{
243 return android::hardware::details::arrayToString(operand.dimensions, operand.dimensions.size()) + " " +
244 toString(operand.type);
245}
246
247#endif
248
Kevin May42477c12020-03-26 13:34:14 +0000249#ifdef ARMNN_ANDROID_NN_V1_3 // Using ::android::hardware::neuralnetworks::V1_3
250
251std::string GetOperandSummary(const V1_3::Operand& operand)
252{
253 return android::hardware::details::arrayToString(operand.dimensions, operand.dimensions.size()) + " " +
254 toString(operand.type);
255}
256
257#endif
258
telsoa015307bc12018-03-09 13:51:08 +0000259using DumpElementFunction = void (*)(const armnn::ConstTensor& tensor,
260 unsigned int elementIndex,
261 std::ofstream& fileStream);
262
263namespace
264{
265template <typename ElementType, typename PrintableType = ElementType>
266void DumpTensorElement(const armnn::ConstTensor& tensor, unsigned int elementIndex, std::ofstream& fileStream)
267{
268 const ElementType* elements = reinterpret_cast<const ElementType*>(tensor.GetMemoryArea());
269 fileStream << static_cast<PrintableType>(elements[elementIndex]) << ",";
270}
271
272constexpr const char* MemoryLayoutString(const armnn::ConstTensor& tensor)
273{
274 const char* str = "";
275
276 switch (tensor.GetNumDimensions())
277 {
278 case 4: { str = "(BHWC) "; break; }
279 case 3: { str = "(HWC) "; break; }
280 case 2: { str = "(HW) "; break; }
281 default: { str = ""; break; }
282 }
283
284 return str;
285}
286} // namespace
287
288void DumpTensor(const std::string& dumpDir,
289 const std::string& requestName,
290 const std::string& tensorName,
291 const armnn::ConstTensor& tensor)
292{
293 // The dump directory must exist in advance.
294 const std::string fileName = boost::str(boost::format("%1%/%2%_%3%.dump") % dumpDir % requestName % tensorName);
295
296 std::ofstream fileStream;
297 fileStream.open(fileName, std::ofstream::out | std::ofstream::trunc);
298
299 if (!fileStream.good())
300 {
301 ALOGW("Could not open file %s for writing", fileName.c_str());
302 return;
303 }
304
305 DumpElementFunction dumpElementFunction = nullptr;
306
307 switch (tensor.GetDataType())
308 {
309 case armnn::DataType::Float32:
310 {
311 dumpElementFunction = &DumpTensorElement<float>;
312 break;
313 }
Derek Lamberti1a38cda2020-01-10 17:28:20 +0000314 case armnn::DataType::QAsymmU8:
telsoa015307bc12018-03-09 13:51:08 +0000315 {
316 dumpElementFunction = &DumpTensorElement<uint8_t, uint32_t>;
317 break;
318 }
319 case armnn::DataType::Signed32:
320 {
321 dumpElementFunction = &DumpTensorElement<int32_t>;
322 break;
323 }
Jim Flynnf2e175c2019-12-12 15:11:30 +0000324 case armnn::DataType::Float16:
325 {
326 dumpElementFunction = &DumpTensorElement<armnn::Half>;
327 break;
328 }
telsoa015307bc12018-03-09 13:51:08 +0000329 default:
330 {
331 dumpElementFunction = nullptr;
332 }
333 }
334
335 if (dumpElementFunction != nullptr)
336 {
337 const unsigned int numDimensions = tensor.GetNumDimensions();
338
339 const unsigned int batch = (numDimensions == 4) ? tensor.GetShape()[numDimensions - 4] : 1;
340
341 const unsigned int height = (numDimensions >= 3)
342 ? tensor.GetShape()[numDimensions - 3]
343 : (numDimensions >= 2) ? tensor.GetShape()[numDimensions - 2] : 1;
344
345 const unsigned int width = (numDimensions >= 3)
346 ? tensor.GetShape()[numDimensions - 2]
347 : (numDimensions >= 1) ? tensor.GetShape()[numDimensions - 1] : 0;
348
349 const unsigned int channels = (numDimensions >= 3) ? tensor.GetShape()[numDimensions - 1] : 1;
350
351 fileStream << "# Number of elements " << tensor.GetNumElements() << std::endl;
352 fileStream << "# Dimensions " << MemoryLayoutString(tensor);
353 fileStream << "[" << tensor.GetShape()[0];
354 for (unsigned int d = 1; d < numDimensions; d++)
355 {
356 fileStream << "," << tensor.GetShape()[d];
357 }
358 fileStream << "]" << std::endl;
359
360 for (unsigned int e = 0, b = 0; b < batch; ++b)
361 {
362 if (numDimensions >= 4)
363 {
364 fileStream << "# Batch " << b << std::endl;
365 }
366 for (unsigned int c = 0; c < channels; c++)
367 {
368 if (numDimensions >= 3)
369 {
370 fileStream << "# Channel " << c << std::endl;
371 }
372 for (unsigned int h = 0; h < height; h++)
373 {
374 for (unsigned int w = 0; w < width; w++, e += channels)
375 {
376 (*dumpElementFunction)(tensor, e, fileStream);
377 }
378 fileStream << std::endl;
379 }
380 e -= channels - 1;
381 if (c < channels)
382 {
383 e -= ((height * width) - 1) * channels;
384 }
385 }
386 fileStream << std::endl;
387 }
388 fileStream << std::endl;
389 }
390 else
391 {
392 fileStream << "Cannot dump tensor elements: Unsupported data type "
393 << static_cast<unsigned int>(tensor.GetDataType()) << std::endl;
394 }
395
396 if (!fileStream.good())
397 {
398 ALOGW("An error occurred when writing to file %s", fileName.c_str());
399 }
400}
401
telsoa01ce3e84a2018-08-31 09:31:35 +0100402void DumpJsonProfilingIfRequired(bool gpuProfilingEnabled,
403 const std::string& dumpDir,
404 armnn::NetworkId networkId,
405 const armnn::IProfiler* profiler)
406{
407 // Check if profiling is required.
408 if (!gpuProfilingEnabled)
409 {
410 return;
411 }
412
413 // The dump directory must exist in advance.
414 if (dumpDir.empty())
415 {
416 return;
417 }
418
Narumol Prangnawarat4d07e5e2020-04-06 16:46:21 +0100419 ARMNN_ASSERT(profiler);
telsoa01ce3e84a2018-08-31 09:31:35 +0100420
421 // Set the name of the output profiling file.
422 const std::string fileName = boost::str(boost::format("%1%/%2%_%3%.json")
423 % dumpDir
424 % std::to_string(networkId)
425 % "profiling");
426
427 // Open the ouput file for writing.
428 std::ofstream fileStream;
429 fileStream.open(fileName, std::ofstream::out | std::ofstream::trunc);
430
431 if (!fileStream.good())
432 {
433 ALOGW("Could not open file %s for writing", fileName.c_str());
434 return;
435 }
436
437 // Write the profiling info to a JSON file.
438 profiler->Print(fileStream);
439}
440
Jim Flynn829ad302019-12-13 14:43:24 +0000441std::string ExportNetworkGraphToDotFile(const armnn::IOptimizedNetwork& optimizedNetwork,
442 const std::string& dumpDir)
443{
444 std::string fileName;
445 // The dump directory must exist in advance.
446 if (dumpDir.empty())
447 {
448 return fileName;
449 }
450
451 std::string timestamp = GetFileTimestamp();
452 if (timestamp.empty())
453 {
454 return fileName;
455 }
456
457 // Set the name of the output .dot file.
458 fileName = boost::str(boost::format("%1%/%2%_networkgraph.dot")
459 % dumpDir
460 % timestamp);
461
462 ALOGV("Exporting the optimized network graph to file: %s", fileName.c_str());
463
464 // Write the network graph to a dot file.
465 std::ofstream fileStream;
466 fileStream.open(fileName, std::ofstream::out | std::ofstream::trunc);
467
468 if (!fileStream.good())
469 {
470 ALOGW("Could not open file %s for writing", fileName.c_str());
471 return fileName;
472 }
473
474 if (optimizedNetwork.SerializeToDot(fileStream) != armnn::Status::Success)
475 {
476 ALOGW("An error occurred when writing to file %s", fileName.c_str());
477 }
478 return fileName;
479}
480
Aron Virginas-Tar573a8fa2019-07-23 14:01:37 +0100481bool IsDynamicTensor(const armnn::TensorInfo& outputInfo)
482{
483 // Dynamic tensors have at least one 0-sized dimension
484 return outputInfo.GetNumElements() == 0u;
485}
486
Jim Flynn829ad302019-12-13 14:43:24 +0000487std::string GetFileTimestamp()
488{
489 // used to get a timestamp to name diagnostic files (the ArmNN serialized graph
490 // and getSupportedOperations.txt files)
491 timespec ts;
492 int iRet = clock_gettime(CLOCK_MONOTONIC_RAW, &ts);
493 std::stringstream ss;
494 if (iRet == 0)
495 {
496 ss << std::to_string(ts.tv_sec) << "_" << std::to_string(ts.tv_nsec);
497 }
498 else
499 {
500 ALOGW("clock_gettime failed with errno %s : %s", std::to_string(errno).c_str(), std::strerror(errno));
501 }
502 return ss.str();
503}
504
505void RenameGraphDotFile(const std::string& oldName, const std::string& dumpDir, const armnn::NetworkId networkId)
506{
507 if (dumpDir.empty())
508 {
509 return;
510 }
511 if (oldName.empty())
512 {
513 return;
514 }
515 const std::string newFileName = boost::str(boost::format("%1%/%2%_networkgraph.dot")
516 % dumpDir
517 % std::to_string(networkId));
518 int iRet = rename(oldName.c_str(), newFileName.c_str());
519 if (iRet != 0)
520 {
521 std::stringstream ss;
522 ss << "rename of [" << oldName << "] to [" << newFileName << "] failed with errno " << std::to_string(errno)
523 << " : " << std::strerror(errno);
524 ALOGW(ss.str().c_str());
525 }
526}
527
Kevin May42477c12020-03-26 13:34:14 +0000528void CommitPools(std::vector<::android::nn::RunTimePoolInfo>& memPools)
529{
530 if (memPools.empty())
531 {
532 return;
533 }
534 // Commit output buffers.
535 // Note that we update *all* pools, even if they aren't actually used as outputs -
536 // this is simpler and is what the CpuExecutor does.
537 for (auto& pool : memPools)
538 {
539 // Type android::nn::RunTimePoolInfo has changed between Android P & Q and Android R, where
540 // update() has been removed and flush() added.
541#if defined(ARMNN_ANDROID_R) // Use the new Android implementation.
542 pool.flush();
543#else
544 pool.update();
545#endif
546 }
547}
548
Jim Flynn829ad302019-12-13 14:43:24 +0000549
550
telsoa015307bc12018-03-09 13:51:08 +0000551} // namespace armnn_driver