From b6af482bc5d8e4f03f876e17909c561de198c4d3 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Tue, 14 Sep 2021 12:33:34 +0100 Subject: Per-operator build dependencies Creates a list of operators their respective dependencies. Alters the build system to walk-through them resolve the dependencies and build Compute Library. Removes the following unused kernels/functions: -[NE|CL]MinMaxLayerKernel -CLFillBorder Resolves: COMPMID-4695,COMPMID-4696 Signed-off-by: Georgios Pinitas Change-Id: I35ebeef38dac25ec5459cfe9c5f7c9a708621124 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/357914 Tested-by: bsgcomp Reviewed-by: Michele DiGiorgio Comments-Addressed: bsgcomp Signed-off-by: Freddie Liardet Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6295 Reviewed-by: Gunes Bayir Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- tests/framework/instruments/SchedulerTimer.cpp | 34 ++++++++++++++++++-------- 1 file changed, 24 insertions(+), 10 deletions(-) (limited to 'tests/framework/instruments/SchedulerTimer.cpp') diff --git a/tests/framework/instruments/SchedulerTimer.cpp b/tests/framework/instruments/SchedulerTimer.cpp index 35f960d368..b753485351 100644 --- a/tests/framework/instruments/SchedulerTimer.cpp +++ b/tests/framework/instruments/SchedulerTimer.cpp @@ -129,16 +129,24 @@ protected: private: std::list::kernel_info> &_kernels; - std::map &_layer_data_map; - IScheduler &_real_scheduler; - WallClock _timer; - std::string _prefix; + std::map &_layer_data_map; + IScheduler &_real_scheduler; + WallClock _timer; + std::string _prefix; }; template SchedulerClock::SchedulerClock(ScaleFactor scale_factor) - : _kernels(), _layer_data_map(), _real_scheduler(nullptr), _real_scheduler_type(), _real_graph_function(nullptr), - _scale_factor(scale_factor), _interceptor(nullptr), _scheduler_users() + : _kernels(), + _layer_data_map(), + _real_scheduler(nullptr), + _real_scheduler_type(), +#ifdef ARM_COMPUTE_GRAPH_ENABLED + _real_graph_function(nullptr), +#endif /* ARM_COMPUTE_GRAPH_ENABLED */ + _scale_factor(scale_factor), + _interceptor(nullptr), + _scheduler_users() { if(instruments_info != nullptr) { @@ -149,6 +157,7 @@ SchedulerClock::SchedulerClock(ScaleFactor scale_factor) template void SchedulerClock::test_start() { +#ifdef ARM_COMPUTE_GRAPH_ENABLED // Start intercepting tasks: ARM_COMPUTE_ERROR_ON(_real_graph_function != nullptr); _real_graph_function = graph::TaskExecutor::get().execute_function; @@ -182,6 +191,7 @@ void SchedulerClock::test_start() scheduler->set_prefix(""); } }; +#endif /* ARM_COMPUTE_GRAPH_ENABLED */ ARM_COMPUTE_ERROR_ON(_real_scheduler != nullptr); _real_scheduler_type = Scheduler::get_type(); @@ -191,7 +201,9 @@ void SchedulerClock::test_start() _real_scheduler = &Scheduler::get(); _interceptor = std::make_shared>(_kernels, _layer_data_map, *_real_scheduler, _scale_factor); Scheduler::set(std::static_pointer_cast(_interceptor)); +#ifdef ARM_COMPUTE_GRAPH_ENABLED graph::TaskExecutor::get().execute_function = task_interceptor; +#endif /* ARM_COMPUTE_GRAPH_ENABLED */ // Create an interceptor for each scheduler // TODO(COMPID-2638) : Allow multiple schedulers, now it assumes the same scheduler is used. @@ -217,10 +229,12 @@ void SchedulerClock::test_stop() { // Restore real scheduler Scheduler::set(_real_scheduler_type); - _real_scheduler = nullptr; - _interceptor = nullptr; + _real_scheduler = nullptr; + _interceptor = nullptr; +#ifdef ARM_COMPUTE_GRAPH_ENABLED graph::TaskExecutor::get().execute_function = _real_graph_function; _real_graph_function = nullptr; +#endif /* ARM_COMPUTE_GRAPH_ENABLED */ // Restore schedulers std::for_each(std::begin(_scheduler_users), std::end(_scheduler_users), @@ -270,9 +284,9 @@ Instrument::MeasurementsMap SchedulerClock::measurements() co } template -std::string SchedulerClock::instrument_header() const +std::string SchedulerClock::instrument_header() const { - std::string output{""}; + std::string output{ "" }; output += R"("layer_data" : {)"; for(auto i_it = _layer_data_map.cbegin(), i_end = _layer_data_map.cend(); i_it != i_end; ++i_it) { -- cgit v1.2.1