24.02.1
|
Go to the documentation of this file.
29 using namespace utils;
33 os <<
"M : " << common_params.
M << std::endl;
34 os <<
"N : " << common_params.
N << std::endl;
35 os <<
"K : " << common_params.
K << std::endl;
36 os <<
"B : " << common_params.
B << std::endl;
37 os <<
"Data type : " << common_params.
data_type << std::endl;
38 os <<
"OpenCL tuner mode : " << common_params.
tuner_mode << std::endl;
44 :
help(
parser.add_option<ToggleOption>(
"help")),
45 M(
parser.add_positional_option<SimpleOption<size_t>>(
"M", 100)),
46 N(
parser.add_positional_option<SimpleOption<size_t>>(
"N", 100)),
47 K(
parser.add_positional_option<SimpleOption<size_t>>(
"K", 50)),
48 B(
parser.add_positional_option<SimpleOption<size_t>>(
"B", 1)),
52 const std::set<DataType> supported_data_types{
58 const std::set<CLTunerMode> supported_tuner_modes{CLTunerMode::EXHAUSTIVE, CLTunerMode::NORMAL, CLTunerMode::RAPID};
61 "Default data type unsupported");
64 tuner_mode =
parser.add_option<EnumOption<CLTunerMode>>(
"tuner-mode", supported_tuner_modes, CLTunerMode::RAPID);
67 M->
set_help(
"Number of lhs matrix rows.");
68 N->
set_help(
"Number of rhs matrix columns.");
69 K->
set_help(
"Number of lhs matrix columns/rhs matrix rows.");
78 common_params.
M = options.
M->
value();
79 common_params.
N = options.
N->
value();
80 common_params.
K = options.
K->
value();
81 common_params.
B = options.
B->
value();
Common command line options used to configure the gemm examples.
arm_compute::utils::EnumOption< arm_compute::CLTunerMode > * tuner_mode
OpenCL tuner mode.
arm_compute::utils::SimpleOption< size_t > * B
Batch size option.
constexpr auto default_data_type
size_t K
Number of lhs matrix columns/rhs matrix rows.
Structure holding all the common gemm example parameters.
::std::ostream & operator<<(::std::ostream &os, const CommonGemmExampleParams &common_params)
Formatted output of the CommonGemmExampleParams type.
Class to parse command line arguments.
#define ARM_COMPUTE_ERROR_ON_MSG(cond, msg)
arm_compute::DataType data_type
Data type.
arm_compute::utils::SimpleOption< size_t > * K
Number of lhs matrix columns/rhs matrix rows option.
const T & value() const
Get the selected value.
arm_compute::utils::ToggleOption * help
Show help option.
size_t N
Number of rhs matrix columns.
void set_help(std::string help)
Set the help message for the option.
arm_compute::utils::EnumOption< arm_compute::DataType > * data_type
Data type.
const T & value() const
Get the option value.
arm_compute::utils::SimpleOption< size_t > * N
Number of rhs matrix columns option.
Copyright (c) 2017-2024 Arm Limited.
CommonGemmExampleParams consume_common_gemm_example_parameters(const CommonGemmExampleOptions &options)
Consumes the common gemm example options and creates a structure containing all information.
CommonGemmExampleOptions(arm_compute::utils::CommandLineParser &parser, arm_compute::DataType default_data_type=arm_compute::DataType::F32)
Constructor.
arm_compute::CLTunerMode tuner_mode
OpenCL tuner mode.
arm_compute::utils::SimpleOption< size_t > * M
Number of lhs matrix rows option.
DataType
Available data types.
size_t M
Number of lhs matrix rows.