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.
MIT License
2.75k stars 767 forks source link

Question about thread-safety #1073

Closed allnes closed 5 months ago

allnes commented 8 months 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.