[ARM CPU] Fix debug fails in acl tbb scheduler (#20842)
This commit is contained in:
parent
d553d4cd55
commit
1b43b3c566
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user