I'm doing some experiments with OpenVINO and OpenCV Stereo Matching algorithms (https://docs.opencv.org/3.4.3/dd/d86/group__stereo.html). My code is using the OpenCV 3.4.3 distribution from OpenVINO 2018 R3. I'm working on Windows 10 platform compiling with Visual Studio 2017 x64.
My CPU is a 7th gen Intel Core: 4 cores with HyperThreading enabled, so 8 logical cores.
While I'm pretty confident with OpenCV, I'm less prepared on OpenVINO and the way you "customize" the thread affinity of the process. I have some questions:
- OpenCV matching algorithms use parallel computing (I see it while running since they runs on all 8 cores), is OpenMP involved here?
- My goal is to tell the program to parallelize using only cores 1,3,5,7 (so "half" of all hyper-threaded cores). Should I use a combination of OMP_PROC_BIND, OMP_NUM_THREADS (I would set it to 4), OMP_PLACES environment vars?
What could be the correct setup? example:
- Are these environment vars used at compile time, or run time? In other words, can I test the different configurations without recompiling the program?
Thanks for the support
you are using an ancient version of OpenVino - the product has vastly improved since OpenVINO 2018 R3 ! Please upgrade to the latest, just released this week - 2019 R1. I believe this blog article will answer many of your questions ! https://software.intel.com/en-us/blogs/2019/04/02/improved-parallelization-extended-deep-learning-ca...
And what that blog article will tell you is that OpenVino starting 2019 R1 is using TBB by default now, not OpenMP.
Thanks Shubha, I'm aware of the 2019 release and I will give it a try later those days, but for this particular work I need to stick with 2018 R3 for a couple of reasons.
Can you help me with those questions about affinity? Thanks