arm_compute v20.11
diff --git a/utils/CommonGraphOptions.cpp b/utils/CommonGraphOptions.cpp
index bcfb865..d262ea8 100644
--- a/utils/CommonGraphOptions.cpp
+++ b/utils/CommonGraphOptions.cpp
@@ -23,6 +23,7 @@
*/
#include "CommonGraphOptions.h"
+#include "arm_compute/core/Utils.h"
#include "arm_compute/graph/TypeLoader.h"
#include "arm_compute/graph/TypePrinter.h"
@@ -169,7 +170,11 @@
data_layout->set_help("Data layout to use");
enable_tuner->set_help("Enable OpenCL dynamic tuner");
enable_cl_cache->set_help("Enable OpenCL program caches");
- tuner_mode->set_help("Configures the time taken by the tuner to tune. Slow tuner produces the most performant LWS configuration");
+ tuner_mode->set_help(
+ "Configures the time taken by the tuner to tune. "
+ "Exhaustive: slowest but produces the most performant LWS configuration. "
+ "Normal: slow but produces the LWS configurations on par with Exhaustive most of the time. "
+ "Rapid: fast but produces less performant LWS configurations");
fast_math_hint->set_help("Enable fast math");
data_path->set_help("Path where graph parameters reside");
image->set_help("Input image for the graph");
diff --git a/utils/CommonGraphOptions.h b/utils/CommonGraphOptions.h
index ab7125e..dac2e10 100644
--- a/utils/CommonGraphOptions.h
+++ b/utils/CommonGraphOptions.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2019 Arm Limited.
+ * Copyright (c) 2018-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -55,6 +55,10 @@
* --validation-range : The range of the images to validate from the validation file (e.g 0,9).
* If not specified all the images will be validated.
* --tuner-file : The file to store the OpenCL dynamic tuner tuned parameters.
+ * --tuner-mode : Select tuner mode. Supported modes: Exhaustive,Normal,Rapid
+ * * Exhaustive: slowest but produces the most performant LWS configuration.
+ * * Normal: slow but produces the LWS configurations on par with Exhaustive most of the time.
+ * * Rapid: fast but produces less performant LWS configurations
*
* Note that data, image and labels options should be provided to perform an inference run on an image.
* Note that validation-file and validation-path should be provided to perform a graph accuracy estimation.
diff --git a/utils/GraphUtils.cpp b/utils/GraphUtils.cpp
index 84f0416..e543cab 100644
--- a/utils/GraphUtils.cpp
+++ b/utils/GraphUtils.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2019 Arm Limited.
+ * Copyright (c) 2017-2020 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -272,9 +272,16 @@
{
std::tie(permuted_shape, perm) = compute_permutation_parameters(tensor.info()->tensor_shape(), tensor.info()->data_layout());
}
+
+#ifdef __arm__
ARM_COMPUTE_EXIT_ON_MSG_VAR(image_loader->width() != permuted_shape.x() || image_loader->height() != permuted_shape.y(),
"Failed to load image file: dimensions [%d,%d] not correct, expected [%" PRIu32 ",%" PRIu32 "].",
image_loader->width(), image_loader->height(), permuted_shape.x(), permuted_shape.y());
+#else // __arm__
+ ARM_COMPUTE_EXIT_ON_MSG_VAR(image_loader->width() != permuted_shape.x() || image_loader->height() != permuted_shape.y(),
+ "Failed to load image file: dimensions [%d,%d] not correct, expected [%" PRIu64 ",%" PRIu64 "].",
+ image_loader->width(), image_loader->height(), permuted_shape.x(), permuted_shape.y());
+#endif // __arm__
// Fill the tensor with the PPM content (BGR)
image_loader->fill_planar_tensor(tensor, _bgr);
@@ -348,9 +355,16 @@
std::tie(permuted_shape, perm) = compute_permutation_parameters(tensor.info()->tensor_shape(),
tensor.info()->data_layout());
}
+
+#ifdef __arm__
ARM_COMPUTE_EXIT_ON_MSG_VAR(jpeg.width() != permuted_shape.x() || jpeg.height() != permuted_shape.y(),
"Failed to load image file: dimensions [%d,%d] not correct, expected [%" PRIu32 ",%" PRIu32 "].",
jpeg.width(), jpeg.height(), permuted_shape.x(), permuted_shape.y());
+#else // __arm__
+ ARM_COMPUTE_EXIT_ON_MSG_VAR(jpeg.width() != permuted_shape.x() || jpeg.height() != permuted_shape.y(),
+ "Failed to load image file: dimensions [%d,%d] not correct, expected [%" PRIu64 ",%" PRIu64 "].",
+ jpeg.width(), jpeg.height(), permuted_shape.x(), permuted_shape.y());
+#endif // __arm__
// Fill the tensor with the JPEG content (BGR)
jpeg.fill_planar_tensor(tensor, _bgr);
diff --git a/utils/Utils.cpp b/utils/Utils.cpp
index 754e7d0..7380ad7 100644
--- a/utils/Utils.cpp
+++ b/utils/Utils.cpp
@@ -37,6 +37,12 @@
#pragma GCC diagnostic ignored "-Wswitch-default"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wstrict-overflow"
+#if (defined(__GNUC__) && (__GNUC__ >= 7))
+#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
+#endif // (defined(__GNUC__) && (__GNUC__ >= 7))
+#if defined(__clang__)
+#pragma GCC diagnostic ignored "-Wparentheses-equality"
+#endif // defined(__clang__)
#define STB_IMAGE_IMPLEMENTATION
#include "stb/stb_image.h"
#pragma GCC diagnostic pop
diff --git a/utils/Utils.h b/utils/Utils.h
index c5db56d..e44d978 100644
--- a/utils/Utils.h
+++ b/utils/Utils.h
@@ -24,10 +24,13 @@
#ifndef __UTILS_UTILS_H__
#define __UTILS_UTILS_H__
+/** @dir .
+ * brief Boiler plate code used by examples. Various utilities to print types, load / store assets, etc.
+ */
+
#include "arm_compute/core/Helpers.h"
#include "arm_compute/core/ITensor.h"
#include "arm_compute/core/Types.h"
-#include "arm_compute/core/Validate.h"
#include "arm_compute/core/Window.h"
#include "arm_compute/runtime/Tensor.h"
#pragma GCC diagnostic push