From 4e0ac6fd6bc647e811cc12c1e3d392a6151ec576 Mon Sep 17 00:00:00 2001 From: Pablo Tello Date: Mon, 1 Oct 2018 14:31:11 +0100 Subject: COMPMID-162: output cpus list and capabilities in validation suite. Change-Id: I6f71f2da851454e8fbbdfc9223592dea9ad03bac Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/151014 Tested-by: bsgcomp Reviewed-by: Giuseppe Rossini Reviewed-by: Isabella Gottardi --- tests/framework/Framework.cpp | 14 ++++++++++++++ tests/framework/Framework.h | 6 ++++++ 2 files changed, 20 insertions(+) (limited to 'tests/framework') diff --git a/tests/framework/Framework.cpp b/tests/framework/Framework.cpp index eea7745230..1d889f3728 100644 --- a/tests/framework/Framework.cpp +++ b/tests/framework/Framework.cpp @@ -23,6 +23,7 @@ */ #include "Framework.h" +#include "arm_compute/runtime/Scheduler.h" #include "support/ToolchainSupport.h" #ifdef ARM_COMPUTE_CL #include "arm_compute/runtime/CL/CLScheduler.h" @@ -41,6 +42,7 @@ namespace framework { Framework::Framework() { + print_cpu_info(std::cout); _available_instruments.emplace(std::pair(InstrumentType::WALL_CLOCK_TIMER, ScaleFactor::NONE), Instrument::make_instrument); _available_instruments.emplace(std::pair(InstrumentType::WALL_CLOCK_TIMER, ScaleFactor::TIME_MS), Instrument::make_instrument); _available_instruments.emplace(std::pair(InstrumentType::WALL_CLOCK_TIMER, ScaleFactor::TIME_S), Instrument::make_instrument); @@ -140,6 +142,18 @@ bool Framework::has_test_info() const return !_test_info.empty(); } +void Framework::print_cpu_info(std::ostream &os) const +{ + const arm_compute::CPUInfo &cpu_info = Scheduler::get().cpu_info(); + const unsigned int num_cpus = cpu_info.get_cpu_num(); + os << "cpu_has_fp16 : " << cpu_info.has_fp16() << " cpu_has_dotprod : " << cpu_info.has_dotprod() << std::endl; + for(unsigned int j = 0; j < num_cpus; ++j) + { + const CPUModel model = cpu_info.get_cpu_model(j); + os << "CPU" << j << " : " << cpu_model_to_string(model) << std::endl; + } +} + void Framework::print_test_info(std::ostream &os) const { if(!_test_info.empty()) diff --git a/tests/framework/Framework.h b/tests/framework/Framework.h index 65ffc0a818..4a26b66bcb 100644 --- a/tests/framework/Framework.h +++ b/tests/framework/Framework.h @@ -161,6 +161,12 @@ public: */ bool has_test_info() const; + /** Print CPU info + * + * @param[out] os Output stream. + */ + void print_cpu_info(std::ostream &os) const; + /** Print test info. * * @param[out] os Output stream. -- cgit v1.2.1