From 1b43b3c5667ebd9b72c05ff8996366c675f26cf0 Mon Sep 17 00:00:00 2001 From: Nesterov Alexander Date: Wed, 29 Nov 2023 10:06:44 +0100 Subject: [PATCH] [ARM CPU] Fix debug fails in acl tbb scheduler (#20842) --- .../intel_cpu/src/nodes/executors/acl/acl_ie_scheduler.cpp | 5 +++-- src/plugins/intel_cpu/src/plugin.cpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/intel_cpu/src/nodes/executors/acl/acl_ie_scheduler.cpp b/src/plugins/intel_cpu/src/nodes/executors/acl/acl_ie_scheduler.cpp index 795b2adc10d..c0449477b21 100644 --- a/src/plugins/intel_cpu/src/nodes/executors/acl/acl_ie_scheduler.cpp +++ b/src/plugins/intel_cpu/src/nodes/executors/acl/acl_ie_scheduler.cpp @@ -24,10 +24,11 @@ void ACLScheduler::set_num_threads(unsigned int num_threads) {} void ACLScheduler::schedule_custom(ICPPKernel *kernel, const Hints &hints, const Window &window, ITensorPack &tensors) { const Window & max_window = window; - const unsigned int num_iterations = max_window.num_iterations_total(); + const unsigned int num_iterations = + max_window.num_iterations(hints.split_dimension()) == 1 ? 1 : max_window.num_iterations_total(); const auto _num_threads = std::min(num_iterations, static_cast(parallel_get_num_threads())); - if (num_iterations == 0) { + if (num_iterations < 1) { return; } diff --git a/src/plugins/intel_cpu/src/plugin.cpp b/src/plugins/intel_cpu/src/plugin.cpp index e8a69f1a081..1159fafce99 100644 --- a/src/plugins/intel_cpu/src/plugin.cpp +++ b/src/plugins/intel_cpu/src/plugin.cpp @@ -157,7 +157,8 @@ Engine::SchedulerGuard::~SchedulerGuard() { // To save the state of scheduler after ACLScheduler has been executed // TODO: find out the cause of the state std::lock_guard lock{this->dest_mutex}; - arm_compute::Scheduler::set(arm_compute::Scheduler::Type::ST); + if (!arm_compute::Scheduler::is_available(arm_compute::Scheduler::Type::CUSTOM)) + arm_compute::Scheduler::set(arm_compute::Scheduler::Type::ST); } #endif