Sync from SUSE:SLFO:Main libfabric revision 5b6d15995db780e058383bb238f40bf2
This commit is contained in:
parent
96d3e13694
commit
b612ff7b6e
14
_constraints
Normal file
14
_constraints
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<constraints>
|
||||||
|
<overwrite>
|
||||||
|
<conditions>
|
||||||
|
<arch>i586</arch>
|
||||||
|
<arch>x86_64</arch>
|
||||||
|
</conditions>
|
||||||
|
<hardware>
|
||||||
|
<cpu>
|
||||||
|
<flag>sse4_2</flag>
|
||||||
|
</cpu>
|
||||||
|
</hardware>
|
||||||
|
</overwrite>
|
||||||
|
</constraints>
|
@ -28,6 +28,7 @@ URL: http://www.github.com/ofiwg/libfabric
|
|||||||
Source: libfabric-%{version}%{git_ver}.tar.bz2
|
Source: libfabric-%{version}%{git_ver}.tar.bz2
|
||||||
Source1: fabtests-rpmlintrc
|
Source1: fabtests-rpmlintrc
|
||||||
Patch0: libfabric-libtool.patch
|
Patch0: libfabric-libtool.patch
|
||||||
|
Patch1: psm3-prevent-code-from-building-using-AVX-AVX2.patch
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
BuildRequires: libfabric-devel = %{version}
|
BuildRequires: libfabric-devel = %{version}
|
||||||
@ -38,7 +39,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|||||||
Fabtests provides a set of examples that uses libfabric, a fabric software library.
|
Fabtests provides a set of examples that uses libfabric, a fabric software library.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n libfabric-%{version}%{git_ver}
|
%autosetup -p0 -n libfabric-%{version}%{git_ver}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
cd fabtests
|
cd fabtests
|
||||||
|
@ -1,8 +1,18 @@
|
|||||||
diff --git a/configure.ac b/configure.ac
|
commit 81de541fdd4abc77167f955f8ddd85f195888e5c
|
||||||
index d137250..4e67035 100644
|
Author: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
|
||||||
--- a/configure.ac
|
Date: Fri Sep 30 13:49:16 2022 +0200
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -89,7 +89,7 @@ AC_HEADER_STDC
|
libfabric libtool
|
||||||
|
|
||||||
|
Disable static libs
|
||||||
|
|
||||||
|
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
|
||||||
|
|
||||||
|
diff --git configure.ac configure.ac
|
||||||
|
index 7dacf69c9a69..90fcdc610754 100644
|
||||||
|
--- configure.ac
|
||||||
|
+++ configure.ac
|
||||||
|
@@ -193,7 +193,7 @@ m4_version_prereq([2.70],
|
||||||
dnl Check for compiler features
|
dnl Check for compiler features
|
||||||
AC_C_TYPEOF
|
AC_C_TYPEOF
|
||||||
|
|
||||||
|
@ -1,3 +1,22 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 2 08:47:15 UTC 2024 - Nicolas Morey <nicolas.morey@suse.com>
|
||||||
|
|
||||||
|
- Completely remove building for AVX/AVX2 in PSM3 (bsc#1213538, bsc#1233356, bsc#1234014)
|
||||||
|
Runtime detection before initializing the provider is not enough as
|
||||||
|
PSM3 uses constructors which may include AVX insctruction.
|
||||||
|
Only requires SSE4.2 as it does make a large performance impact
|
||||||
|
in calculatin packet hashes.
|
||||||
|
- Remove psm3-fix-SIGILL-on-system-not-supporting-AVX.patch
|
||||||
|
- Add psm3-prevent-code-from-building-using-AVX-AVX2.patch
|
||||||
|
- Add _constraints to mark SSE4.2 as required
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 28 15:47:54 UTC 2024 - Nicolas Morey <nicolas.morey@suse.com>
|
||||||
|
|
||||||
|
- Add psm3-fix-SIGILL-on-system-not-supporting-AVX.patch to fix
|
||||||
|
SIGILL hapening during init on older CPU (bsc#1213538, bsc#1233356).
|
||||||
|
- Refresh libfabric-libtool.patch tu support patch -p0
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Aug 5 11:20:55 UTC 2024 - Filip Kastl <filip.kastl@suse.com>
|
Mon Aug 5 11:20:55 UTC 2024 - Filip Kastl <filip.kastl@suse.com>
|
||||||
|
|
||||||
|
@ -35,6 +35,7 @@ Group: Development/Libraries/C and C++
|
|||||||
Source: %{name}-%{version}%{git_ver}.tar.bz2
|
Source: %{name}-%{version}%{git_ver}.tar.bz2
|
||||||
Source1: baselibs.conf
|
Source1: baselibs.conf
|
||||||
Patch0: libfabric-libtool.patch
|
Patch0: libfabric-libtool.patch
|
||||||
|
Patch1: psm3-prevent-code-from-building-using-AVX-AVX2.patch
|
||||||
URL: http://www.github.com/ofiwg/libfabric
|
URL: http://www.github.com/ofiwg/libfabric
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -79,7 +80,7 @@ libfabric provides a user-space API to access high-performance fabric
|
|||||||
services, such as RDMA. This package contains the development files.
|
services, such as RDMA. This package contains the development files.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n %{name}-%{version}%{git_ver}
|
%autosetup -p0 -n %{name}-%{version}%{git_ver}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS=-Wno-incompatible-pointer-types
|
export CFLAGS=-Wno-incompatible-pointer-types
|
||||||
|
83
psm3-prevent-code-from-building-using-AVX-AVX2.patch
Normal file
83
psm3-prevent-code-from-building-using-AVX-AVX2.patch
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
commit fdb3ddfe4e372022adcc1093f7f28d49021662ce
|
||||||
|
Author: Nicolas Morey <nmorey@suse.com>
|
||||||
|
Date: Mon Dec 2 09:44:02 2024 +0100
|
||||||
|
|
||||||
|
psm3: prevent code from building using AVX/AVX2
|
||||||
|
|
||||||
|
Even with a snippet detecting if the CPU is compatible, PSM3 uses multiple
|
||||||
|
constructors which may trigger a SIGILL when the library gets loaded
|
||||||
|
|
||||||
|
Signed-off-by: Nicolas Morey <nmorey@suse.com>
|
||||||
|
|
||||||
|
diff --git prov/psm3/configure.m4 prov/psm3/configure.m4
|
||||||
|
index 5c8c083f7dc0..88e6871c1a9e 100644
|
||||||
|
--- prov/psm3/configure.m4
|
||||||
|
+++ prov/psm3/configure.m4
|
||||||
|
@@ -125,49 +125,7 @@ AC_DEFUN([FI_PSM3_CONFIGURE],[
|
||||||
|
],[
|
||||||
|
psm3_happy=0
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
- AC_MSG_NOTICE([psm3 requires minimum of avx instruction set to build])
|
||||||
|
- ])
|
||||||
|
- CFLAGS=$save_CFLAGS
|
||||||
|
-
|
||||||
|
- AC_MSG_CHECKING([for -mavx support])
|
||||||
|
- save_CFLAGS=$CFLAGS
|
||||||
|
- CFLAGS="$PSM3_STRIP_OPTFLAGS -mavx -O0"
|
||||||
|
- AC_LINK_IFELSE(
|
||||||
|
- [AC_LANG_PROGRAM(
|
||||||
|
- [[#include <immintrin.h>]],
|
||||||
|
- [[unsigned long long _a[4] = {1ULL,2ULL,3ULL,4ULL};
|
||||||
|
- __m256i vA = _mm256_loadu_si256((__m256i *)_a);
|
||||||
|
- __m256i vB;
|
||||||
|
- _mm256_store_si256(&vB, vA);
|
||||||
|
- return 0;]])
|
||||||
|
- ],[
|
||||||
|
- AC_MSG_RESULT([yes])
|
||||||
|
- PSM3_ARCH_CFLAGS="-mavx"
|
||||||
|
- PSM3_MARCH="avx"
|
||||||
|
- ],[
|
||||||
|
- psm3_happy=0
|
||||||
|
- AC_MSG_RESULT([no])
|
||||||
|
- AC_MSG_NOTICE([psm3 requires minimum of avx instruction set to build])
|
||||||
|
- ])
|
||||||
|
- CFLAGS=$save_CFLAGS
|
||||||
|
-
|
||||||
|
- AC_MSG_CHECKING([for -mavx2 support])
|
||||||
|
- save_CFLAGS=$CFLAGS
|
||||||
|
- CFLAGS="$PSM3_STRIP_OPTFLAGS -mavx2 -O0"
|
||||||
|
- AC_LINK_IFELSE(
|
||||||
|
- [AC_LANG_PROGRAM(
|
||||||
|
- [[#include <immintrin.h>]],
|
||||||
|
- [[unsigned long long _a[4] = {1ULL,2ULL,3ULL,4ULL};
|
||||||
|
- __m256i vA = _mm256_loadu_si256((__m256i *)_a);
|
||||||
|
- __m256i vB = _mm256_add_epi64(vA, vA);
|
||||||
|
- (void)vB;
|
||||||
|
- return 0;]])
|
||||||
|
- ],[
|
||||||
|
- AC_MSG_RESULT([yes])
|
||||||
|
- PSM3_ARCH_CFLAGS="-mavx2"
|
||||||
|
- PSM3_MARCH="avx2"
|
||||||
|
- ],[
|
||||||
|
- AC_MSG_RESULT([no])
|
||||||
|
+ AC_MSG_NOTICE([psm3 requires minimum of SSE4.2 instruction set to build])
|
||||||
|
])
|
||||||
|
CFLAGS=$save_CFLAGS
|
||||||
|
|
||||||
|
diff --git prov/psm3/src/psmx3_init.c prov/psm3/src/psmx3_init.c
|
||||||
|
index 29359d3ea348..a02c1ff8698b 100644
|
||||||
|
--- prov/psm3/src/psmx3_init.c
|
||||||
|
+++ prov/psm3/src/psmx3_init.c
|
||||||
|
@@ -685,10 +685,8 @@ static int psmx3_getinfo(uint32_t api_version, const char *node,
|
||||||
|
PSMX3_INFO(&psmx3_prov, FI_LOG_CORE,
|
||||||
|
"CPU does not support '%s'.\n", PSM3_MARCH);
|
||||||
|
OFI_INFO_STR(&psmx3_prov,
|
||||||
|
- (__builtin_cpu_supports("avx2") ? "AVX2" :
|
||||||
|
- (__builtin_cpu_supports("avx") ? "AVX" :
|
||||||
|
- (__builtin_cpu_supports("sse4.2") ? "SSE4.2" : "unknown"))),
|
||||||
|
- PSM3_MARCH, "CPU Supports", "PSM3 Built With");
|
||||||
|
+ __builtin_cpu_supports("sse4.2") ? "SSE4.2" : "unknown",
|
||||||
|
+ PSM3_MARCH, "CPU Supports", "PSM3 Built With");
|
||||||
|
goto err_out;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user