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;
94 os <<
"Data path : " << common_params.
data_path << std::endl;
96 if(!common_params.
image.empty())
98 os <<
"Image file : " << common_params.
image << std::endl;
100 if(!common_params.
labels.empty())
102 os <<
"Labels file : " << common_params.
labels << std::endl;
107 os <<
"Validation file : " << common_params.
validation_file << std::endl;
110 os <<
"Validation path : " << common_params.
validation_path << std::endl;
136 std::set<arm_compute::graph::Target> supported_targets
143 std::set<arm_compute::DataType> supported_data_types
151 std::set<DataLayout> supported_data_layouts
157 const std::set<CLTunerMode> supported_tuner_modes
177 "Configures the time taken by the tuner to tune. " 178 "Exhaustive: slowest but produces the most performant LWS configuration. " 179 "Normal: slow but produces the LWS configurations on par with Exhaustive most of the time. " 180 "Rapid: fast but produces less performant LWS configurations");
209 common_params.fast_math_hint = options.
fast_math_hint->
is_set() ? fast_math_hint_value : FastMathHint::Disabled;
215 common_params.validation_range_start = validation_range.first;
216 common_params.validation_range_end = validation_range.second;
220 return common_params;
Arm® Neon™ capable target device.
ToggleOption * enable_tuner
Enable tuner.
SimpleOption< arm_compute::CLTunerMode > * tuner_mode
Tuner mode.
std::string validation_path
unsigned int validation_range_start
ToggleOption * help
Show help option.
SimpleOption< std::string > * mlgo_file
File to load the MLGO heuristics from.
EnumOption< arm_compute::DataType > * data_type
Graph data type.
EnumOption< arm_compute::DataLayout > * data_layout
Graph data layout.
arm_compute::graph::Target target
Implementation of an option that can be either true or false.
1 channel, 1 F32 per channel
const DataLayout data_layout
Fast math enabled for Convolution layer.
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...
Common command line options used to configure the graph examples.
SimpleOption< std::string > * tuner_file
File to load/store the tuner's values from.
Class to parse command line arguments.
arm_compute::DataLayout data_layout
arm_compute::CLTunerMode tuner_mode
unsigned int validation_range_end
Copyright (c) 2017-2021 Arm Limited.
1 channel, 1 F16 per channel
EnumOption< arm_compute::graph::Target > * target
Graph execution target.
Searches a minimal subset of LWS configurations while tuning.
inline ::std::ostream & operator<<(::std::ostream &os, const Target &target)
Formatted output of the Target.
std::string validation_file
SimpleTensor< T > range(SimpleTensor< T > &dst, float start, const size_t num_of_elements, float step)
ToggleOption * enable_cl_cache
Enable opencl kernels cache.
quantized, asymmetric fixed-point 8-bit number unsigned
const T & value() const
Get the option value.
int stoi(const std::string &str, std::size_t *pos=0, NumericBase base=NumericBase::BASE_10)
Convert string values to integer.
ToggleOption * fast_math_hint
Fast math hint.
SimpleOption< std::string > * validation_file
Validation file.
Num samples, channels, height, width.
FastMathHint
Enable or disable fast math for Convolution layer.
const T & value() const
Get the selected value.
Structure holding all the common graph parameters.
SimpleOption< std::string > * validation_path
Validation data path.
Num samples, height, width, channels.
Implementation of a simple option that accepts a value from a fixed set.
SimpleOption< std::string > * validation_range
Validation range.
SimpleOption< std::string > * data_path
Trainable parameters path.
SimpleOption< std::string > * labels
Labels.
bool is_set() const
Has a value been assigned to the option?
quantized, asymmetric fixed-point 8-bit number signed
SimpleOption< int > * threads
Number of threads option.
Searches all possible LWS configurations while tuning.
arm_compute::DataType data_type
arm_compute::graph::FastMathHint fast_math_hint
Implementation of an option that accepts a single value.
void set_help(std::string help)
Set the help message for the option.
SimpleOption< std::string > * image
Image.