ARM-software / ComputeLibrary

The Compute Library is a set of computer vision and machine learning functions optimised for both Arm CPUs and GPUs using SIMD technologies.
2.87k stars 782 forks source link

Question about thread-safety #1073

Closed allnes closed 10 months ago

allnes commented 1 year ago

Hello!

I am writing to you regarding threading in arm compute library. You provide your own interface for threading and scheduling - https://arm-software.github.io/ComputeLibrary/latest/classarm__compute_1_1_i_scheduler.xhtml . We are trying in this PR (https://github.com/openvinotoolkit/openvino/pull/18885) to adapt your scheduling approach for TBB library. But we get a problem (seg. faults, data race etc) for eltwise operations when we use several configure(...) functions in parallel.

In this place (https://arm-software.github.io/ComputeLibrary/latest/architecture.xhtml) you write - "the current runtime module implementation is not thread-safe in the sense of executing different functions from separate threads". Does the use of multiple configure(...) functions in a parallel call include this case from the documentation?

If so, may I ask if you will be improving the thread-safety approach? If not, then there is a bug-like problem for the eltwise layer.