Skip to content
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

Is there a plan to let USD be compatible with tbb 2022?? #2088

Open
jiapei100 opened this issue Nov 13, 2022 · 2 comments
Open

Is there a plan to let USD be compatible with tbb 2022?? #2088

jiapei100 opened this issue Nov 13, 2022 · 2 comments

Comments

@jiapei100
Copy link

Happened to realize that current USD is still based on some previous tbb, rather than oneapi of 2022. I tried to figure out issues caused by tbb incompatibility, please refer to my PR at #2087. However, there are still quite a few of ERRORs as following:

[ 20%] Building CXX object pxr/base/work/CMakeFiles/work.dir/detachedTask.cpp.o
cd ....../USD/build/pxr/base/work && /usr/bin/c++ -DBOOST_PYTHON_DYN_LINK -DBOOST_PYTHON_NO_LIB -DBOOST_PYTHON_NO_PY_SIGNATURES -DGLX_GLXEXT_PROTOTYPES -DGL_GLEXT_PROTOTYPES -DMFB_ALT_PACKAGE_NAME=work -DMFB_PACKAGE_MODULE=Work -DMFB_PACKAGE_NAME=work -DPXR_BUILD_LOCATION=usd -DPXR_PLUGIN_BUILD_LOCATION=../plugin/usd -DPXR_PYTHON_ENABLED=1 -DPXR_PYTHON_MODULES_ENABLED=1 -DWORK_EXPORTS=1 -Dwork_EXPORTS -I....../USD/build/pxr/base/work -I....../USD/pxr/base/work -I....../USD/build/include -isystem /opt/intel/oneapi/tbb/latest/include -isystem /usr/include/python3.10 -Wall -Wformat-security -pthread -Wno-deprecated -Wno-deprecated-declarations -Wno-unused-local-typedefs -Wno-placement-new  -O3 -DNDEBUG -fPIC -std=c++14 -MD -MT pxr/base/work/CMakeFiles/work.dir/detachedTask.cpp.o -MF CMakeFiles/work.dir/detachedTask.cpp.o.d -o CMakeFiles/work.dir/detachedTask.cpp.o -c ....../USD/pxr/base/work/detachedTask.cpp
In file included from ....../USD/pxr/base/work/detachedTask.h:32,
                 from ....../USD/pxr/base/work/detachedTask.cpp:26:
....../USD/pxr/base/work/dispatcher.h:140:44: error: expected class-name before ‘{’ token
  140 |     struct _InvokerTask : public tbb::task {
      |                                            ^
....../USD/pxr/base/work/dispatcher.h:147:22: error: ‘task’ in namespace ‘tbb’ does not name a type
  147 |         virtual tbb::task* execute() {
      |                      ^~~~
In file included from /opt/intel/oneapi/tbb/2021.7.1/include/oneapi/tbb/enumerable_thread_specific.h:36,
                 from /opt/intel/oneapi/tbb/latest/include/tbb/enumerable_thread_specific.h:17,
                 from ....../USD/pxr/base/tf/diagnosticMgr.h:46,
                 from ....../USD/pxr/base/tf/errorMark.h:30,
                 from ....../USD/pxr/base/work/detachedTask.h:30,
                 from ....../USD/pxr/base/work/detachedTask.cpp:26:
/opt/intel/oneapi/tbb/2021.7.1/include/oneapi/tbb/task.h:26:11: note: ‘tbb::v1::task’ declared here
   26 | namespace task {
      |           ^~~~
In file included from ....../USD/pxr/base/work/detachedTask.h:32,
                 from ....../USD/pxr/base/work/detachedTask.cpp:26:
....../USD/pxr/base/work/dispatcher.h:175:10: error: ‘task_group_context’ in namespace ‘tbb’ does not name a type
  175 |     tbb::task_group_context _context;
      |          ^~~~~~~~~~~~~~~~~~
....../USD/pxr/base/work/dispatcher.h:176:10: error: ‘empty_task’ in namespace ‘tbb’ does not name a type
  176 |     tbb::empty_task* _rootTask;
      |          ^~~~~~~~~~
....../USD/pxr/base/work/dispatcher.h: In member function ‘void pxrInternal_v0_22__pxrReserved__::WorkDispatcher::Run(Callable&&)’:
....../USD/pxr/base/work/dispatcher.h:106:9: error: ‘_rootTask’ was not declared in this scope
  106 |         _rootTask->spawn(_MakeInvokerTask(std::forward<Callable>(c)));
      |         ^~~~~~~~~
....../USD/pxr/base/work/dispatcher.h: In member function ‘pxrInternal_v0_22__pxrReserved__::WorkDispatcher::_InvokerTask<typename std::remove_reference<_Tp>::type>& pxrInternal_v0_22__pxrReserved__::WorkDispatcher::_MakeInvokerTask(Fn&&)’:
....../USD/pxr/base/work/dispatcher.h:163:22: error: ‘_rootTask’ was not declared in this scope
  163 |         return *new( _rootTask->allocate_additional_child_of(*_rootTask) )
      |                      ^~~~~~~~~
make[2]: *** [pxr/base/work/CMakeFiles/work.dir/build.make:138: pxr/base/work/CMakeFiles/work.dir/detachedTask.cpp.o] Error 1
make[2]: Leaving directory '....../USD/build'
make[1]: *** [CMakeFiles/Makefile2:4209: pxr/base/work/CMakeFiles/work.dir/all] Error 2
make[1]: Leaving directory '....../USD/build'
make: *** [Makefile:149: all] Error 2

Is there a plan for USD be compatible with tbb-2021.7.1 please?

Thank you

@spiffmon
Copy link
Member

Hello, @jiapei100 . Please refer to Issue #1471 , especially this comment for context on why USD does not yet support TBB OneAPI. It will be awhile before USD officially ships with 2021+, but we are willing to accept PR's that provide support for 2020- and 2021+ . PR #1908 could be such a contribution with the requested refactoring.

We will likely begin the work of supporting OneApi sometime next year, but I cannot say when, or whether it will be completed before 2024.

@sunyab
Copy link
Contributor

sunyab commented Nov 19, 2022

Filed as internal issue #USD-7773

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants