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.
[MRG] BUILD: warn instead of raise when openmp unsupported #15174
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
[MRG] BUILD: warn instead of raise when openmp unsupported #15174
Changes from all commits
8e65e19
f37ca84
28c512e
e1d50a7
8842f53
a950dad
9b67fa6
71ce4bc
099d8b9
4c07fee
96ca9ae
1b8dbcf
d0d0375
c5171ce
11e26f4
05ccef4
c8fc3a2
e18eb59
d229d6a
bdfba79
d98c37b
abf5af9
1bade3f
ac6ced4
a580c10
88b7549
693d4fb
cb6e2d0
36a975e
9c574bf
189c31d
b1ab494
610059b
1e2add7
1ab5c36
26897f5
06217d2
d53e4b3
b987644
a95b826
eda819f
73549c7
1247dd6
bcedf28
07b9893
ac1c312
c6665ff
ca2ff82
48ae706
fd93902
58bb3ac
365e9fd
1072da9
62b6d1b
a6e7b93
2250b56
2da7585
2e6392c
3d50dbb
f1fa1ef
c53404b
a179b7e
93ef87c
d09db8a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I find this logic of setting
sklearn._OPENMP_SUPPORTED
here and using it insetup.py
quite complicated. TBH I don't even understand it. Please add comments to explain what's going on.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.
I'm sorry I don't get what's odd with that.
maybe_cythonize_extensions
is a function called in the setup. It sets an attribute to the sklearn module and then this attribute is used in another function.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.
I think the comment should be improved to explain that:
SKLEARN_OPENMP_SUPPORTED
build-time Cython variable to the cythonize call.build_ext
subclass defined in the top-levelsetup.py
file to actually build the compiled extensions with OpenMP flags if needed.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.
Thanks for the comment, it helps.
Take it with a huge grain of salt, but from a pure design POV setting and then using
sklearn._OPENMP_SUPPORTED
does look like some ugly stateful side effect. I don't know the build enough to propose anything else though (sorry)...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.
I don't really see a cleaner alternative given the constraints of the distutils extension building API.