aboutsummaryrefslogtreecommitdiff
path: root/tests/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/main.cpp')
-rw-r--r--tests/main.cpp33
1 files changed, 23 insertions, 10 deletions
diff --git a/tests/main.cpp b/tests/main.cpp
index e1963b1609..e862c7627e 100644
--- a/tests/main.cpp
+++ b/tests/main.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2021 Arm Limited.
+ * Copyright (c) 2017-2023 Arm Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
+#include "arm_compute/core/Version.h"
#include "support/StringSupport.h"
#include "tests/AssetsLibrary.h"
#include "tests/framework/DatasetModes.h"
@@ -116,7 +117,7 @@ int main(int argc, char **argv)
auto filter_id = parser.add_option<utils::SimpleOption<std::string>>("filter-id");
filter_id->set_help("List of test ids. ... can be used to define a range.");
auto stop_on_error = parser.add_option<utils::ToggleOption>("stop-on-error");
- stop_on_error->set_help("Abort execution after the first failed test (useful for debugging)");
+ stop_on_error->set_help("Stop execution after the first failed test (useful for debugging)");
auto seed = parser.add_option<utils::SimpleOption<std::random_device::result_type>>("seed", std::random_device()());
seed->set_help("Global seed for random number generation");
auto list_tests = parser.add_option<utils::ToggleOption>("list-tests", false);
@@ -127,6 +128,8 @@ int main(int argc, char **argv)
error_on_missing_assets->set_help("Mark a test as failed instead of skipping it when assets are missing");
auto assets = parser.add_positional_option<utils::SimpleOption<std::string>>("assets");
assets->set_help("Path to the assets directory");
+ auto print_rerun_command = parser.add_option<utils::ToggleOption>("rerun-cmd");
+ print_rerun_command->set_help("Print out the command to rerun the exact failed testcase");
#ifdef ARM_COMPUTE_CL
auto enable_tuner = parser.add_option<utils::ToggleOption>("enable-tuner");
enable_tuner->set_help("Enable OpenCL dynamic tuner");
@@ -236,10 +239,18 @@ int main(int argc, char **argv)
#endif /* ARM_COMPUTE_CL */
const arm_compute::CPUInfo &cpu_info = Scheduler::get().cpu_info();
const unsigned int num_cpus = cpu_info.get_cpu_num();
+
p->print_entry("cpu_has_sve", support::cpp11::to_string(cpu_info.has_sve()));
+ p->print_entry("cpu_has_sve2", support::cpp11::to_string(cpu_info.has_sve2()));
+ p->print_entry("cpu_has_svef32mm", support::cpp11::to_string(cpu_info.has_svef32mm()));
+ p->print_entry("cpu_has_svei8mm", support::cpp11::to_string(cpu_info.has_svei8mm()));
+ p->print_entry("cpu_has_svebf16", support::cpp11::to_string(cpu_info.has_svebf16()));
+ p->print_entry("cpu_has_sme", support::cpp11::to_string(cpu_info.has_sme()));
+ p->print_entry("cpu_has_sme2", support::cpp11::to_string(cpu_info.has_sme2()));
p->print_entry("cpu_has_fp16", support::cpp11::to_string(cpu_info.has_fp16()));
p->print_entry("cpu_has_bf16", support::cpp11::to_string(cpu_info.has_bf16()));
p->print_entry("cpu_has_dotprod", support::cpp11::to_string(cpu_info.has_dotprod()));
+ p->print_entry("cpu_has_i8mm", support::cpp11::to_string(cpu_info.has_i8mm()));
for(unsigned int j = 0; j < num_cpus; ++j)
{
@@ -262,14 +273,16 @@ int main(int argc, char **argv)
// Initialize framework
framework::FrameworkConfig fconfig;
- fconfig.instruments = options.instruments->value();
- fconfig.name_filter = filter->value();
- fconfig.id_filter = filter_id->value();
- fconfig.num_iterations = options.iterations->value();
- fconfig.mode = dataset_mode->value();
- fconfig.log_level = options.log_level->value();
- fconfig.cooldown_sec = cooldown_sec->value();
- fconfig.configure_only = configure_only->value();
+ fconfig.instruments = options.instruments->value();
+ fconfig.name_filter = filter->value();
+ fconfig.id_filter = filter_id->value();
+ fconfig.num_iterations = options.iterations->value();
+ fconfig.mode = dataset_mode->value();
+ fconfig.log_level = options.log_level->value();
+ fconfig.cooldown_sec = cooldown_sec->value();
+ fconfig.configure_only = configure_only->value();
+ fconfig.print_rerun_cmd = print_rerun_command->value();
+ fconfig.seed = seed->value();
framework.init(fconfig);
for(auto &p : printers)