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

BLD: Add NPY_DISABLE_SVML env var to opt out of SVML #20842

Merged
merged 1 commit into from Jan 17, 2022

Conversation

charris
Copy link
Member

@charris charris commented Jan 17, 2022

Backport of #20695.

SVML uses AVX-512 extensions that are only supported on sufficiently new Intel CPUs. Hard-requiring this vendored library for all x86_64 Linux platforms is not appropriate. When I build on an AMD Zen 2 CPU, I get errors to the effect of

/usr/lib/python3.10/site-packages/numpy/core/_multiarray_umath.so: undefined symbol: __svml_log108

when trying to import numpy. Furthermore, the simple platform check thwarts cross-compilation because it is the host, rather than the target, that is checked.

This patch adds recogniton for NPY_DISABLE_SVML=1 in the environment, which will Numpy to build without the vendored SVML library. It might also be desirable to make the default-on behavior a little more nuanced than simply looking for Linux x86_64. However, I dont' have any specific ideas about the circumstances under which it should be enabled by default.

@charris charris added 08 - Backport Used to tag backport PRs 36 - Build Build related PR labels Jan 17, 2022
@charris charris added this to the 1.22.2 release milestone Jan 17, 2022
@charris charris merged commit 28e83c0 into numpy:maintenance/1.22.x Jan 17, 2022
@charris charris deleted the backport-20695 branch January 17, 2022 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
08 - Backport Used to tag backport PRs 36 - Build Build related PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants