aboutsummaryrefslogtreecommitdiff
path: root/utils/CommonGraphOptions.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/CommonGraphOptions.h')
-rw-r--r--utils/CommonGraphOptions.h41
1 files changed, 24 insertions, 17 deletions
diff --git a/utils/CommonGraphOptions.h b/utils/CommonGraphOptions.h
index 3666462643..c42e06cb84 100644
--- a/utils/CommonGraphOptions.h
+++ b/utils/CommonGraphOptions.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018-2019 ARM Limited.
+ * Copyright (c) 2018-2021 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -24,13 +24,13 @@
#ifndef ARM_COMPUTE_EXAMPLES_UTILS_COMMON_GRAPH_OPTIONS
#define ARM_COMPUTE_EXAMPLES_UTILS_COMMON_GRAPH_OPTIONS
-#include "utils/command_line/CommandLineOptions.h"
-#include "utils/command_line/CommandLineParser.h"
-
#include "arm_compute/graph/TypeLoader.h"
#include "arm_compute/graph/TypePrinter.h"
#include "arm_compute/runtime/CL/CLTunerTypes.h"
+#include "utils/command_line/CommandLineOptions.h"
+#include "utils/command_line/CommandLineParser.h"
+
namespace arm_compute
{
namespace utils
@@ -40,7 +40,7 @@ namespace utils
*
* --help : Print the example's help message.
* --threads : The number of threads to be used by the example during execution.
- * --target : Execution target to be used by the examples. Supported target options: NEON, CL, GC.
+ * --target : Execution target to be used by the examples. Supported target options: Neon, CL, CLVK.
* --type : Data type to be used by the examples. Supported data type options: QASYMM8, F16, F32.
* --layout : Data layout to be used by the examples. Supported data layout options : NCHW, NHWC.
* --enable-tuner : Toggle option to enable the OpenCL dynamic tuner.
@@ -55,10 +55,13 @@ namespace utils
* --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.
- * Note GLES target is not supported for most of the networks.
*
* Example execution commands:
*
@@ -89,23 +92,25 @@ namespace utils
/** Structure holding all the common graph parameters */
struct CommonGraphParams
{
- bool help{ false };
- int threads{ 0 };
- arm_compute::graph::Target target{ arm_compute::graph::Target::NEON };
- arm_compute::DataType data_type{ DataType::F32 };
- arm_compute::DataLayout data_layout{ DataLayout::NHWC };
- bool enable_tuner{ false };
- bool enable_cl_cache{ false };
- arm_compute::CLTunerMode tuner_mode{ CLTunerMode::NORMAL };
- arm_compute::graph::FastMathHint fast_math_hint{ arm_compute::graph::FastMathHint::Disabled };
+ bool help{false};
+ int threads{0};
+ int batches{1};
+ arm_compute::graph::Target target{arm_compute::graph::Target::NEON};
+ arm_compute::DataType data_type{DataType::F32};
+ arm_compute::DataLayout data_layout{DataLayout::NHWC};
+ bool enable_tuner{false};
+ bool enable_cl_cache{false};
+ arm_compute::CLTunerMode tuner_mode{CLTunerMode::NORMAL};
+ arm_compute::graph::FastMathHint fast_math_hint{arm_compute::graph::FastMathHint::Disabled};
std::string data_path{};
std::string image{};
std::string labels{};
std::string validation_file{};
std::string validation_path{};
std::string tuner_file{};
- unsigned int validation_range_start{ 0 };
- unsigned int validation_range_end{ std::numeric_limits<unsigned int>::max() };
+ std::string mlgo_file{};
+ unsigned int validation_range_start{0};
+ unsigned int validation_range_end{std::numeric_limits<unsigned int>::max()};
};
/** Formatted output of the CommonGraphParams type
@@ -147,6 +152,7 @@ public:
ToggleOption *help; /**< Show help option */
SimpleOption<int> *threads; /**< Number of threads option */
+ SimpleOption<int> *batches; /**< Number of batches */
EnumOption<arm_compute::graph::Target> *target; /**< Graph execution target */
EnumOption<arm_compute::DataType> *data_type; /**< Graph data type */
EnumOption<arm_compute::DataLayout> *data_layout; /**< Graph data layout */
@@ -161,6 +167,7 @@ public:
SimpleOption<std::string> *validation_path; /**< Validation data path */
SimpleOption<std::string> *validation_range; /**< Validation range */
SimpleOption<std::string> *tuner_file; /**< File to load/store the tuner's values from */
+ SimpleOption<std::string> *mlgo_file; /**< File to load the MLGO heuristics from */
};
/** Consumes the common graph options and creates a structure containing any information