Repository navigation
Pin TBB support with respect to incompatible 2021.6 API. - #8109
Merged
Merged
Conversation
stuartarchibald
marked this pull request as ready for review
May 25, 2022 08:26
As title. Numba is not yet compatible with TBB 2021.6 API, but the ABI seems ok.
stuartarchibald
force-pushed
the
wip/restrict_tbb_lt_2021_6
branch
from
May 25, 2022 09:40
4fadc68 to
ef555a6
Compare
esc
approved these changes
May 25, 2022
esc
left a comment
Member
There was a problem hiding this comment.
I reviewed this by visually inspecting the version numbers and documentation upgrades. I also tried to build Numba in a conda environment with pip installed tbb==2021.6.0 and tbb-devel=2021.6.0 and watched the compilation fail.
numba/np/ufunc/tbbpool.cpp:31:2: error: #error "TBB version is incompatible, 2021.1 through to 2021.5 required, i.e. 12010 <= TBB_INTERFACE_VERSION < 12060"
31 | #error "TBB version is incompatible, 2021.1 through to 2021.5 required, i.e. 12010 <= TBB_INTERFACE_VERSION < 12060"
| ^~~~~
numba/np/ufunc/tbbpool.cpp: In function 'void prepare_fork()':
numba/np/ufunc/tbbpool.cpp:229:52: error: no matching function for call to 'tbb::detail::d1::task_scheduler_handle::release(tbb::detail::d1::task_scheduler_handle&)'
229 | tbb::task_scheduler_handle::release(tsh);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
In file included from /home/ci/miniconda3/envs/test-tbb-too-new/include/oneapi/tbb.h:50,
from /home/ci/miniconda3/envs/test-tbb-too-new/include/tbb/tbb.h:17,
from numba/np/ufunc/tbbpool.cpp:15:
/home/ci/miniconda3/envs/test-tbb-too-new/include/oneapi/tbb/global_control.h:145:10: note: candidate: 'void tbb::detail::d1::task_scheduler_handle::release()'
145 | void release() {
| ^~~~~~~
/home/ci/miniconda3/envs/test-tbb-too-new/include/oneapi/tbb/global_control.h:145:10: note: candidate expects 0 arguments, 1 provided
numba/np/ufunc/tbbpool.cpp: In function 'void reset_after_fork()':
numba/np/ufunc/tbbpool.cpp:254:43: error: 'get' is not a member of 'tbb::detail::d1::task_scheduler_handle'
254 | tsh = tbb::task_scheduler_handle::get();
| ^~~
numba/np/ufunc/tbbpool.cpp: In function 'void launch_threads(int)':
numba/np/ufunc/tbbpool.cpp:292:39: error: 'get' is not a member of 'tbb::detail::d1::task_scheduler_handle'
292 | tsh = tbb::task_scheduler_handle::get();
Patch looks good.
gmarkall
approved these changes
May 25, 2022
gmarkall
left a comment
Member
There was a problem hiding this comment.
Just to confirm what was said OOB, the preprocessor version check on TBB_INTERFACE_VERSION appears to correctly constrain the set of acceptable versions. For example, I get:
$ g++ -E -DTBB_INTERFACE_VERSION=12060 version.cpp
# 0 "version.cpp"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "version.cpp"
version.cpp:4:2: error: #error "TBB version is incompatible, 2021.1 through to 2021.5 required, i.e. 12010 <= TBB_INTERFACE_VERSION < 12060"
4 | #error "TBB version is incompatible, 2021.1 through to 2021.5 required, i.e. 12010 <= TBB_INTERFACE_VERSION < 12060"
| ^~~~~
1 gmarkall@blixen 09:39:29 (main) ~/numbadev/issues/8109
$ g++ -E -DTBB_INTERFACE_VERSION=12059 version.cpp
# 0 "version.cpp"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "version.cpp"
0 gmarkall@blixen 09:39:35 (main) ~/numbadev/issues/8109
$ g++ -E -DTBB_INTERFACE_VERSION=12010 version.cpp
# 0 "version.cpp"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "version.cpp"
0 gmarkall@blixen 09:39:40 (main) ~/numbadev/issues/8109
$ g++ -E -DTBB_INTERFACE_VERSION=12009 version.cpp
# 0 "version.cpp"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "version.cpp"
version.cpp:4:2: error: #error "TBB version is incompatible, 2021.1 through to 2021.5 required, i.e. 12010 <= TBB_INTERFACE_VERSION < 12060"
4 | #error "TBB version is incompatible, 2021.1 through to 2021.5 required, i.e. 12010 <= TBB_INTERFACE_VERSION < 12060"
| ^~~~~
where version.cpp is:
#if (TBB_INTERFACE_VERSION >= 12060) || (TBB_INTERFACE_VERSION < 12010)
#error "TBB version is incompatible, 2021.1 through to 2021.5 required, i.e. 12010 <= TBB_INTERFACE_VERSION < 12060"
#endif
Contributor
Author
stuartarchibald
added a commit
to stuartarchibald/numba
that referenced
this pull request
May 25, 2022
….6 API. As title. Numba is not yet compatible with TBB 2021.6 API, but the ABI seems ok. Conflicts: buildscripts/condarecipe.local/meta.yaml docs/source/user/installing.rst
stuartarchibald
added a commit
to stuartarchibald/numba
that referenced
this pull request
May 25, 2022
….6 API. As title. Numba is not yet compatible with TBB 2021.6 API, but the ABI seems ok.
esc
added a commit
to sklam/numba
that referenced
this pull request
May 25, 2022
… into misc/backport0.55_combine * numba/pull/8103: also remove run_constrained for NumPy Backport numba#8102: Combine numpy run_constrained in meta.yaml to the run requirements * numba/pull/8114: Backport numba#8109 Pin TBB support with respect to incompatible 2021.6 API.
esc
added a commit
that referenced
this pull request
May 25, 2022
Backport #8109 Pin TBB support with respect to incompatible 2021.6 API.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As title. Numba is not yet compatible with TBB 2021.6 API, but the
ABI seems ok.