diff options
Diffstat (limited to 'examples/gemm_tuner/CommonGemmExampleOptions.h')
-rw-r--r-- | examples/gemm_tuner/CommonGemmExampleOptions.h | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/examples/gemm_tuner/CommonGemmExampleOptions.h b/examples/gemm_tuner/CommonGemmExampleOptions.h index 5c4be286d6..38178bcef8 100644 --- a/examples/gemm_tuner/CommonGemmExampleOptions.h +++ b/examples/gemm_tuner/CommonGemmExampleOptions.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020 Arm Limited. + * Copyright (c) 2019-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -26,20 +26,23 @@ #include "arm_compute/core/Types.h" #include "arm_compute/core/Utils.h" -#include "utils/TypePrinter.h" +#include "arm_compute/runtime/CL/CLTuner.h" + #include "utils/command_line/CommandLineOptions.h" #include "utils/command_line/CommandLineParser.h" +#include "utils/TypePrinter.h" namespace gemm_tuner { /** Structure holding all the common gemm example parameters */ struct CommonGemmExampleParams { - size_t M{ 100 }; /**< Number of lhs matrix rows */ - size_t N{ 100 }; /**< Number of rhs matrix columns */ - size_t K{ 50 }; /**< Number of lhs matrix columns/rhs matrix rows */ - size_t B{ 1 }; /**< Batch size */ - arm_compute::DataType data_type{ arm_compute::DataType::F32 }; /**< Data type */ + size_t M{100}; /**< Number of lhs matrix rows */ + size_t N{100}; /**< Number of rhs matrix columns */ + size_t K{50}; /**< Number of lhs matrix columns/rhs matrix rows */ + size_t B{1}; /**< Batch size */ + arm_compute::DataType data_type{arm_compute::DataType::F32}; /**< Data type */ + arm_compute::CLTunerMode tuner_mode{arm_compute::CLTunerMode::RAPID}; /**< OpenCL tuner mode */ }; /** Formatted output of the CommonGemmExampleParams type @@ -65,9 +68,11 @@ class CommonGemmExampleOptions public: /** Constructor * - * @param[in,out] parser A parser on which "parse()" hasn't been called yet. + * @param[in,out] parser A parser on which "parse()" hasn't been called yet. + * @param[in] default_data_type Default data type if unspecified. */ - CommonGemmExampleOptions(arm_compute::utils::CommandLineParser &parser); + CommonGemmExampleOptions(arm_compute::utils::CommandLineParser &parser, + arm_compute::DataType default_data_type = arm_compute::DataType::F32); /** Prevent instances of this class from being copied (As this class contains pointers) */ CommonGemmExampleOptions(const CommonGemmExampleOptions &) = delete; /** Prevent instances of this class from being copied (As this class contains pointers) */ @@ -79,12 +84,13 @@ public: /** Default destructor */ ~CommonGemmExampleOptions() = default; - arm_compute::utils::ToggleOption *help; /**< Show help option */ - arm_compute::utils::SimpleOption<size_t> *M; /**< Number of lhs matrix rows option */ - arm_compute::utils::SimpleOption<size_t> *N; /**< Number of rhs matrix columns option */ - arm_compute::utils::SimpleOption<size_t> *K; /**< Number of lhs matrix columns/rhs matrix rows option */ - arm_compute::utils::SimpleOption<size_t> *B; /**< Batch size option */ - arm_compute::utils::EnumOption<arm_compute::DataType> *data_type; /**< Data type */ + arm_compute::utils::ToggleOption *help; /**< Show help option */ + arm_compute::utils::SimpleOption<size_t> *M; /**< Number of lhs matrix rows option */ + arm_compute::utils::SimpleOption<size_t> *N; /**< Number of rhs matrix columns option */ + arm_compute::utils::SimpleOption<size_t> *K; /**< Number of lhs matrix columns/rhs matrix rows option */ + arm_compute::utils::SimpleOption<size_t> *B; /**< Batch size option */ + arm_compute::utils::EnumOption<arm_compute::DataType> *data_type; /**< Data type */ + arm_compute::utils::EnumOption<arm_compute::CLTunerMode> *tuner_mode; /**< OpenCL tuner mode */ }; /** Consumes the common gemm example options and creates a structure containing all information |