Skip to content

Commit

Permalink
revert changes
Browse files Browse the repository at this point in the history
  • Loading branch information
allnes committed Oct 17, 2023
1 parent 88b4f0e commit 87da7a7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/plugins/intel_cpu/src/nodes/executors/acl/acl_eltwise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ namespace intel_cpu {

using namespace arm_compute;

static std::mutex & get_mtx_ifunc() {
static std::mutex mtx_ifunc;
return mtx_ifunc;
}

inline VectorDims reshape_sizes(VectorDims dims) {
const size_t MAX_NUM_SHAPE = arm_compute::MAX_DIMS;
VectorDims result_dims(MAX_NUM_SHAPE - 1);
Expand Down Expand Up @@ -495,6 +500,10 @@ bool AclEltwiseExecutor::init(const EltwiseAttrs &eltwiseAttrs, const std::vecto
IE_THROW() << "Unsupported operation type for ACL Eltwise executor: " << static_cast<int>(aclEltwiseAttrs.algorithm);
}

// We get a problem (seg. faults, data race etc) for eltwise operations when we use several configure(...) functions in parallel.
// We created issue about this problem here: https://github.com/ARM-software/ComputeLibrary/issues/1073
// TODO: change it when we will get an answer to our question in issue
std::lock_guard<std::mutex> _lock {get_mtx_ifunc()};
ifunc = exec_func();
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/intel_cpu/src/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static std::mutex & get_mtx_acl() {
}

static std::shared_ptr<ov::intel_cpu::ACLScheduler> & get_acl_scheduler() {
static thread_local std::shared_ptr<ov::intel_cpu::ACLScheduler> acl_scheduler =
static std::shared_ptr<ov::intel_cpu::ACLScheduler> acl_scheduler =
std::make_shared<ov::intel_cpu::ACLScheduler>();
return acl_scheduler;
}
Expand Down

0 comments on commit 87da7a7

Please sign in to comment.