Skip to content

Commit

Permalink
fix for review - 3
Browse files Browse the repository at this point in the history
  • Loading branch information
allnes committed Mar 13, 2024
1 parent 3ddae2c commit 4327891
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
12 changes: 12 additions & 0 deletions src/plugins/intel_cpu/src/nodes/executors/acl/acl_utils.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright (C) 2018-2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//

#include "acl_utils.hpp"

void ov::intel_cpu::configureThreadSafe(const std::function<void(void)>& config) {
// Issue: CVS-123514
static arm_compute::Mutex mtx_config;
arm_compute::lock_guard<arm_compute::Mutex> _lock{mtx_config};
config();
}
8 changes: 1 addition & 7 deletions src/plugins/intel_cpu/src/nodes/executors/acl/acl_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,7 @@ inline arm_compute::DataLayout getAclDataLayoutByMemoryDesc(MemoryDescCPtr desc)
* For example, calling configure for Eltwise operations from multiple streams leads to a data race and seg fault.
* @param config ComputeLibrary configuration function
*/
void configureThreadSafe(const std::function<void(void)>& config) {
// Issue: CVS-123514
static arm_compute::Mutex mtx_config;
mtx_config.lock();
config();
mtx_config.unlock();
}
void configureThreadSafe(const std::function<void(void)>& config);

} // namespace intel_cpu
} // namespace ov

0 comments on commit 4327891

Please sign in to comment.