Add a cpu-optimization option for disable-optimization [1], disabled by default,
otherwise import numpy failed on qemux86-64 with kvm
[snip]
>>> import numpy as np
...
RuntimeError: NumPy was built with baseline optimizations:
(X86_V2) but your machine doesn't support:
(X86_V2).
[snip]

[1] https://numpy.org/doc/stable/reference/simd/build-options.html

Signed-off-by: Hongxu Jia <[email protected]>
---
 meta/recipes-devtools/python/python3-numpy_2.4.2.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-devtools/python/python3-numpy_2.4.2.bb 
b/meta/recipes-devtools/python/python3-numpy_2.4.2.bb
index 8a9351e371..c349c683c8 100644
--- a/meta/recipes-devtools/python/python3-numpy_2.4.2.bb
+++ b/meta/recipes-devtools/python/python3-numpy_2.4.2.bb
@@ -23,6 +23,7 @@ inherit pkgconfig ptest python_mesonpy github-releases cython
 S = "${UNPACKDIR}/numpy-${PV}"
 
 PACKAGECONFIG[svml] = "-Ddisable-svml=false,-Ddisable-svml=true"
+PACKAGECONFIG[cpu-optimization] = 
"-Ddisable-optimization=false,-Ddisable-optimization=true"
 
 # the overflow tests fail with compiler-rt on aarch64
 LDFLAGS:append:toolchain-clang:aarch64 = " -rtlib=libgcc -unwindlib=libgcc"
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#233851): 
https://lists.openembedded.org/g/openembedded-core/message/233851
Mute This Topic: https://lists.openembedded.org/mt/118495599/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to