Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 710691 Details for
Bug 788184
dev-python/scipy-1.6.1: compilation failed "RuntimeError: NumPy was built with baseline optimizations: (SSE SSE2 SSE3 SSSE3 SSE41 POPCNT SSE42) but your machine doesn't support: (POPCNT)"
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Actually fix the popcnt test
fix_popcnt_test2.patch (text/plain), 924 bytes, created by
Carl Michal
on 2021-05-23 15:35:06 UTC
(
hide
)
Description:
Actually fix the popcnt test
Filename:
MIME Type:
Creator:
Carl Michal
Created:
2021-05-23 15:35:06 UTC
Size:
924 bytes
patch
obsolete
>diff --git a/numpy/distutils/checks/cpu_popcnt.c b/numpy/distutils/checks/cpu_popcnt.c >index e6a80fb40..540c98dab 100644 >--- a/numpy/distutils/checks/cpu_popcnt.c >+++ b/numpy/distutils/checks/cpu_popcnt.c >@@ -4,20 +4,16 @@ > #include <popcntintrin.h> > #endif > >-int main(void) >+int main(int argc, char **argv) > { >- long long a = 0; >- int b; >-#ifdef _MSC_VER >- #ifdef _M_X64 >- a = _mm_popcnt_u64(1); >- #endif >- b = _mm_popcnt_u32(1); >-#else >- #ifdef __x86_64__ >- a = __builtin_popcountll(1); >- #endif >- b = __builtin_popcount(1); >+ // To make sure popcnt instructions are generated >+ // and been tested against the assembler >+ unsigned long long a = *((unsigned long long*)argv[argc-1]); >+ unsigned int b = *((unsigned int*)argv[argc-2]); >+ >+#if defined(_M_X64) || defined(__x86_64__) >+ a = _mm_popcnt_u64(a); > #endif >+ b = _mm_popcnt_u32(b); > return (int)a + b; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 788184
:
706377
|
710367
| 710691