Re: F25 builds a library with AVX, causes SIGILL on AMD
On Tue, 23 May 2017 09:30:14 +0300 Benson Muitewrote: > Will this mean that repository builds will typically have poor > performance to support portability? Yes. In extreme cases, where the difference in performance is measurable, the library may need to be modified to select a proper implementation at runtime. Ironically, liberasurecode crashed on the part that's only invoked once per data block, so obviously it's not performance critical to such a degree. In addition, I'm not sure a conversion to floating point is even necessary there. Note that in case of liberasurecode, the library itself is by definition is a switcher shim. Those that want performance specify the fastest Galois Field implementation and liberasurecode then uses -ldl. The fastsest known module for Intel CPUs is their in-house ISA-L library. -- Pete ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Re: F25 builds a library with AVX, causes SIGILL on AMD
On Tuesday, 23 May 2017 at 08:30, Benson Muite wrote: > Will this mean that repository builds will typically have poor performance > to support portability? It depends on how much gain is there from enabling AVX instructions, but yes, we have to disable any non-runtime-detected usage of instructions supported only by certain processors. Regards, Dominik -- Fedora http://fedoraproject.org/wiki/User:Rathann RPMFusion http://rpmfusion.org "Faith manages." -- Delenn to Lennier in Babylon 5:"Confessions and Lamentations" ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Re: F25 builds a library with AVX, causes SIGILL on AMD
Am 23.05.2017 um 07:00 schrieb Pete Zaitcev: Hi, All: I'm going to re-state the problem in short, but in case, URL https://bugzilla.redhat.com/show_bug.cgi?id=1454543 - I maintain a library (liberasurecode) - It contains a call to ceill() from -lm - When Koji builds the code, something makes gcc to inline AVX - The result blows up: Program received signal SIGILL, Illegal instruction. 0x7fafaf9e04bd in liberasurecode_get_aligned_data_size ( => 0x778c44bd <+61>:vxorpd %xmm0,%xmm0,%xmm0 As much as I can tell, there's nothing custom in CFLAGS in Makefile.am, everything is inherited from RPM somehow. Here's how the actual line looks like in Koji logs: libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -I../include/erasurecode -I../include/xor_codes -I../include/rs_vand -I../include/isa_l -I../include/shss -Werror -O2 -g -Werror -D_GNU_SOURCE=1 -Wall -pedantic -std=c99 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -mmmx -DINTEL_MMX -msse -DINTEL_SSE -msse2 -DINTEL_SSE2 -msse3 -DINTEL_SSE3 -mssse3 -DINTEL_SSSE3 -msse4.1 -DINTEL_SSE41 -msse4.2 -DINTEL_SSE42 -mavx -DINTEL_AVX -DARCH_64 -c erasurecode.c -fPIC -DPIC -o .libs/liberasurecode_la-erasurecode.o So, what now? I have no clue where to start fixing this. Thanks in advance for any suggestions, -- Pete Hi Pete, for some reason upstream appends `-mmmx -DINTEL_MMX -msse -DINTEL_SSE -msse2 -DINTEL_SSE2 -msse3 -DINTEL_SSE3 -mssse3 -DINTEL_SSSE3 -msse4.1 -DINTEL_SSE41 -msse4.2 -DINTEL_SSE42 -mavx -DINTEL_AVX` to CFLAGS, activating avx and several different sse versions… You must remove remove those (except for sse <= 2 on x86_64), to make the compiled binaries portable between different (older) CPUs; those might be set in configure.ac [1] as well… Cheers, Björn [1] https://github.com/openstack/liberasurecode/blob/master/configure.ac#L155 ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Re: F25 builds a library with AVX, causes SIGILL on AMD
Hi, Will this mean that repository builds will typically have poor performance to support portability? Benson On 05/23/2017 08:15 AM, Pete Zaitcev wrote: On Mon, 22 May 2017 23:00:14 -0600 Pete Zaitcevwrote: As much as I can tell, there's nothing custom in CFLAGS in Makefile.am, everything is inherited from RPM somehow. Here's how the actual line looks like in Koji logs: Hate to reply to myself, but I'm an idiot as usual. The culprit is in configure.ac, not in Makefile.am $CC - -E -mavx /dev/null 2>&1 if [[ $? == "0" ]]; then SUPPORTED_FLAGS="$SUPPORTED_FLAGS -mavx" AC_MSG_RESULT([$CC supports -mavx]) fi I need to nail down this stuff to some generally portable subset. Sorry for the noise, -- Pete ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Re: F25 builds a library with AVX, causes SIGILL on AMD
On Mon, 22 May 2017 23:00:14 -0600 Pete Zaitcevwrote: > As much as I can tell, there's nothing custom in CFLAGS in Makefile.am, > everything is inherited from RPM somehow. Here's how the actual line > looks like in Koji logs: Hate to reply to myself, but I'm an idiot as usual. The culprit is in configure.ac, not in Makefile.am $CC - -E -mavx /dev/null 2>&1 if [[ $? == "0" ]]; then SUPPORTED_FLAGS="$SUPPORTED_FLAGS -mavx" AC_MSG_RESULT([$CC supports -mavx]) fi I need to nail down this stuff to some generally portable subset. Sorry for the noise, -- Pete ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org
F25 builds a library with AVX, causes SIGILL on AMD
Hi, All: I'm going to re-state the problem in short, but in case, URL https://bugzilla.redhat.com/show_bug.cgi?id=1454543 - I maintain a library (liberasurecode) - It contains a call to ceill() from -lm - When Koji builds the code, something makes gcc to inline AVX - The result blows up: Program received signal SIGILL, Illegal instruction. 0x7fafaf9e04bd in liberasurecode_get_aligned_data_size ( => 0x778c44bd <+61>:vxorpd %xmm0,%xmm0,%xmm0 As much as I can tell, there's nothing custom in CFLAGS in Makefile.am, everything is inherited from RPM somehow. Here's how the actual line looks like in Koji logs: libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../include -I../include/erasurecode -I../include/xor_codes -I../include/rs_vand -I../include/isa_l -I../include/shss -Werror -O2 -g -Werror -D_GNU_SOURCE=1 -Wall -pedantic -std=c99 -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -mmmx -DINTEL_MMX -msse -DINTEL_SSE -msse2 -DINTEL_SSE2 -msse3 -DINTEL_SSE3 -mssse3 -DINTEL_SSSE3 -msse4.1 -DINTEL_SSE41 -msse4.2 -DINTEL_SSE42 -mavx -DINTEL_AVX -DARCH_64 -c erasurecode.c -fPIC -DPIC -o .libs/liberasurecode_la-erasurecode.o So, what now? I have no clue where to start fixing this. Thanks in advance for any suggestions, -- Pete ___ devel mailing list -- devel@lists.fedoraproject.org To unsubscribe send an email to devel-le...@lists.fedoraproject.org