Skip to content

Commit

Permalink
[ARM CPU] Fix debug fails in acl tbb scheduler (openvinotoolkit#20842)
Browse files Browse the repository at this point in the history
  • Loading branch information
allnes authored Nov 29, 2023
1 parent d553d4c commit 1b43b3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<unsigned int>(parallel_get_num_threads()));

if (num_iterations == 0) {
if (num_iterations < 1) {
return;
}

Expand Down
3 changes: 2 additions & 1 deletion src/plugins/intel_cpu/src/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::mutex> 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

Expand Down

0 comments on commit 1b43b3c

Please sign in to comment.