-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore compilaltion with tbb 2017u7 #3007
Restore compilaltion with tbb 2017u7 #3007
Conversation
@asuhov could you please check tbb 2017 build with this patch? |
@@ -7,6 +7,7 @@ function(set_ie_threading_interface_for TARGET_NAME) | |||
find_package(TBB COMPONENTS tbb tbbmalloc) | |||
set("TBB_FOUND" ${TBB_FOUND} PARENT_SCOPE) | |||
set("TBB_IMPORTED_TARGETS" ${TBB_IMPORTED_TARGETS} PARENT_SCOPE) | |||
set("TBB_VERSION" ${TBB_VERSION} PARENT_SCOPE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may we need to put them in cache? In this case we don't need play with PARENT_SCOPE in other files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Global cache is not always good idea. Particularly for this case we have a problem multiple TBB::tbb target definition only when call file package from one cmake script. If try it form different places cmake keeps this TBB import targets locally and there are no conflicts.
So if we change TBB_FOUND to cache it will break other places where TBB is used.
Other concern. As you know, cache are stored separately, and will be reused for next cmake reload. For that case we will miss TBB target forever till next reset cache and reload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other question WHY did you move find_package inside a function? Was it request from @mryzhov?
Previously it was exported in root cmake file and will be available for each subfolders in OV project. But not each subfolder try to create it own version of tbb import.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was requested by @alalek because for 3rd party component we don't need to find TBB since TBB it's a private IE dependency.
E.g. when OpenCV is build against IE, InferenceEngineConfig.cmake finds TBB, but does not use it (it can use it only if set_threading_interface is called for some targets)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid issues with function's scope it makes sense to convert it into a macro (or split into a macro part with find_package()
and a function with internal logic).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
during skype discussion we also agreed with @AlexPeskov that we also need to find TBB only in IE paths (and we need to set TBB_DIR / TBBROOT for that before calling ie_parallel.cmake
), because currently find TBB can find any TBB on the system, because nobody sets proper location when we use prebuild OpenVINO package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AlexPeskov are you going to apply changes we agreed?
99d162e
to
c97888d
Compare
@AlexPeskov IE build with TBB 2017 failed, please check this log: |
@asuhov could you please rerun this job. It missed last fix for reduce operation. |
Signed-off-by: Alexander Peskov <[email protected]>
Signed-off-by: Alexander Peskov <[email protected]>
22339d6
to
0ca94c5
Compare
* Restore compilaltion with tbb 2017u7 Signed-off-by: Alexander Peskov <[email protected]> * Fix unsupported arg for tbb deterministic_reduce Signed-off-by: Alexander Peskov <[email protected]> Co-authored-by: Alexander Zhogov <[email protected]>
* Restore compilaltion with tbb 2017u7 Signed-off-by: Alexander Peskov <[email protected]> * Fix unsupported arg for tbb deterministic_reduce Signed-off-by: Alexander Peskov <[email protected]> Co-authored-by: Alexander Zhogov <[email protected]> Co-authored-by: Alexander Peskov <[email protected]> Co-authored-by: Alexander Zhogov <[email protected]>
* Restore compilaltion with tbb 2017u7 Signed-off-by: Alexander Peskov <[email protected]> * Fix unsupported arg for tbb deterministic_reduce Signed-off-by: Alexander Peskov <[email protected]> Co-authored-by: Alexander Zhogov <[email protected]>
* Restore compilaltion with tbb 2017u7 Signed-off-by: Alexander Peskov <[email protected]> * Fix unsupported arg for tbb deterministic_reduce Signed-off-by: Alexander Peskov <[email protected]> Co-authored-by: Alexander Zhogov <[email protected]>
* Restore compilaltion with tbb 2017u7 Signed-off-by: Alexander Peskov <[email protected]> * Fix unsupported arg for tbb deterministic_reduce Signed-off-by: Alexander Peskov <[email protected]> Co-authored-by: Alexander Zhogov <[email protected]>
* Restore compilaltion with tbb 2017u7 Signed-off-by: Alexander Peskov <[email protected]> * Fix unsupported arg for tbb deterministic_reduce Signed-off-by: Alexander Peskov <[email protected]> Co-authored-by: Alexander Zhogov <[email protected]>
* Restore compilaltion with tbb 2017u7 Signed-off-by: Alexander Peskov <[email protected]> * Fix unsupported arg for tbb deterministic_reduce Signed-off-by: Alexander Peskov <[email protected]> Co-authored-by: Alexander Zhogov <[email protected]>
Previous PR 2966 just broke build with retro TBB.
This patch should fix it.