* Property to force terminate tbb threads
During inference done, tbb threads cannot be closed by itself, which cause memory leak and unload/lingering threads.
Sometimes the tbb threads need to be terminate for resource(memory, thread) consumption
This PR contains:
1. Add a new property to control whether force to terminate tbb threads.
2. Property key is "FORCE_TBB_TERMINATE", default value is false.
3. Explicitly to terminate tbb task scheduler during unload openvino dll if this property is set true.
e.g: core.set_property(device, ov::force_tbb_terminate(true));
4. If not set FORCE_TBB_TERMINATE, there will be no any additional tbb operations.
Change-Id: I32dc0ba122bb19a9dbf3ba12fdd596aad9ac54b4
* Fix executorManager test case
Change executorManager from static to be dynamic, the test case should fit this change.
* Fix race condition between executor and executorManger
* Add test case for tbb property
1. Add basic test case for ov::force_tbb_terminate property
2. set ov::force_tbb_terminate to be false
* Avoid terminate tbb in case of no tbb thread created
* change tbb blocking_terminate to terminate
Tbb blocking_terminate calling will cause some segmentfault during run some special models,
the reason may comes from block_terminate cause current thread block here to wait for tbb exit,
but cannot handle some resource dependencies.
After adopt terminate(), the dependencies can be resolved and no segmentfault any more.
Change-Id: I0b920630a25cd3fd2747c57ec71ca749ba35573b
* Disable dynamic lib test case in static library compilation version
As CVS-68982 description, we should disable the test case which will load
dynamic library in openvino static library compilation.
* Address reviewer's comments
* Fix coverity issue in executorManager
1. fix coverity issue
2. avoid oneTBB build error due to different API with TBB
Change-Id: I0339446e33186e0ce57de07aa8492186f2f6e369
* oneTBB support terminate tbb thread
Change-Id: Iea618b72db193bd48bfbf0dba3586dcdb139c43f
* Add FORCE_TBB_TERMINATE to legacy API
* Put this config into proper place
* fix issue in property test
* Add some descriprion for this config
* Xiaoxia/onetbb old version (#12303)
* support oneTBB old version
* fix oneTBB version mismatch issues
* fix clang issue
* add 'tbb' path to setupvars.sh and OpenVINOConfig.cmake.in
* Update scripts/setupvars/setupvars.sh
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
Co-authored-by: Shen, Wanglei <wanglei.shen@intel.com>
Co-authored-by: River,Li <river.li@intel.com>
Co-authored-by: Sun Xiaoxia <xiaoxia.sun@intel.com>
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
Co-authored-by: Shen, Wanglei <wanglei.shen@intel.com>