24.02.1
|
Go to the documentation of this file.
38 std::pair<unsigned int, unsigned int> parse_validation_range(
const std::string &validation_range)
40 std::pair<
unsigned int ,
unsigned int >
range = {0, std::numeric_limits<unsigned int>::max()};
41 if (!validation_range.empty())
44 std::stringstream stream(validation_range);
47 std::getline(stream,
str,
',');
58 std::getline(stream,
str);
79 std::string false_str = std::string(
"false");
80 std::string true_str = std::string(
"true");
82 os <<
"Threads : " << common_params.
threads << std::endl;
83 os <<
"Target : " << common_params.
target << std::endl;
84 os <<
"Data type : " << common_params.
data_type << std::endl;
85 os <<
"Data layout : " << common_params.
data_layout << std::endl;
86 os <<
"Tuner enabled? : " << (common_params.
enable_tuner ? true_str : false_str) << std::endl;
87 os <<
"Cache enabled? : " << (common_params.
enable_cl_cache ? true_str : false_str) << std::endl;
88 os <<
"Tuner mode : " << common_params.
tuner_mode << std::endl;
89 os <<
"Tuner file : " << common_params.
tuner_file << std::endl;
90 os <<
"MLGO file : " << common_params.
mlgo_file << std::endl;
95 os <<
"Data path : " << common_params.
data_path << std::endl;
97 if (!common_params.
image.empty())
99 os <<
"Image file : " << common_params.
image << std::endl;
101 if (!common_params.
labels.empty())
103 os <<
"Labels file : " << common_params.
labels << std::endl;
109 os <<
"Validation file : " << common_params.
validation_file << std::endl;
112 os <<
"Validation path : " << common_params.
validation_path << std::endl;
139 std::set<arm_compute::graph::Target> supported_targets{
145 std::set<arm_compute::DataType> supported_data_types{
152 std::set<DataLayout> supported_data_layouts{
173 "Exhaustive: slowest but produces the most performant LWS configuration. "
174 "Normal: slow but produces the LWS configurations on par with Exhaustive most of the time. "
175 "Rapid: fast but produces less performant LWS configurations");
219 return common_params;
@ NCHW
Num samples, channels, height, width.
ToggleOption * help
Show help option.
@ Enabled
Fast math enabled for Convolution layer.
@ NHWC
Num samples, height, width, channels.
@ QASYMM8
quantized, asymmetric fixed-point 8-bit number unsigned
arm_compute::CLTunerMode tuner_mode
@ NEON
Arm® Neon™ capable target device.
unsigned int validation_range_end
SimpleOption< std::string > * labels
Labels.
ToggleOption * enable_tuner
Enable tuner.
inline ::std::ostream & operator<<(::std::ostream &os, const Target &target)
Formatted output of the Target.
unsigned int validation_range_start
ToggleOption * fast_math_hint
Fast math hint.
SimpleOption< int > * threads
Number of threads option.
SimpleOption< std::string > * mlgo_file
File to load the MLGO heuristics from.
arm_compute::graph::Target target
constexpr auto data_layout
@ EXHAUSTIVE
Searches all possible LWS configurations while tuning.
SimpleOption< arm_compute::CLTunerMode > * tuner_mode
Tuner mode.
ToggleOption * enable_cl_cache
Enable opencl kernels cache.
SimpleOption< std::string > * image
Image.
@ NORMAL
Searches a subset of LWS configurations while tuning.
arm_compute::DataLayout data_layout
Class to parse command line arguments.
Common command line options used to configure the graph examples.
@ QASYMM8_SIGNED
quantized, asymmetric fixed-point 8-bit number signed
EnumOption< arm_compute::DataType > * data_type
Graph data type.
Implementation of an option that can be either true or false.
@ RAPID
Searches a minimal subset of LWS configurations while tuning.
void consume_common_graph_parameters(CommonGraphValidateOptions &options, CommonParams &common_params)
Consumes the consume_common_graph_parameters graph options and creates a structure containing any inf...
bool is_set() const
Has a value been assigned to the option?
SimpleOption< std::string > * tuner_file
File to load/store the tuner's values from.
const T & value() const
Get the selected value.
SimpleOption< int > * batches
Number of batches.
SimpleTensor< T > range(SimpleTensor< T > &dst, float start, const size_t num_of_elements, float step)
std::string validation_file
EnumOption< arm_compute::graph::Target > * target
Graph execution target.
void set_help(std::string help)
Set the help message for the option.
FastMathHint
Enable or disable fast math for Convolution layer.
Implementation of a simple option that accepts a value from a fixed set.
const T & value() const
Get the option value.
Copyright (c) 2017-2024 Arm Limited.
SimpleOption< std::string > * validation_path
Validation data path.
@ F16
16-bit floating-point number
int stoi(const std::string &str, std::size_t *pos=0, NumericBase base=NumericBase::BASE_10)
Convert string values to integer.
arm_compute::graph::FastMathHint fast_math_hint
arm_compute::DataType data_type
@ F32
32-bit floating-point number
SimpleOption< std::string > * data_path
Trainable parameters path.
SimpleOption< std::string > * validation_file
Validation file.
Implementation of an option that accepts a single value.
Structure holding all the common graph parameters.
EnumOption< arm_compute::DataLayout > * data_layout
Graph data layout.
SimpleOption< std::string > * validation_range
Validation range.
std::string validation_path