Skip to content

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

Merged
charris merged 1 commit intonumpy:maintenance/1.22.xfrom
charris:backport-20695
Jan 17, 2022
Merged

BLD: Add NPY_DISABLE_SVML env var to opt out of SVML#20842
charris merged 1 commit intonumpy:maintenance/1.22.xfrom
charris:backport-20695

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.

2 participants