public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/libxsmm] rawhide: Update libxsmm to 2.1.0 (rhbz#2512898)
@ 2026-09-22  8:51 SY Wang
  0 siblings, 0 replies; only message in thread
From: SY Wang @ 2026-09-22  8:51 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/libxsmm
Branch : rawhide
Commit : 033dfe608c9ed7cd41a8337caf773d6952a517cc
Author : SY Wang <uwsy1059@qq.com>
Date   : 2026-08-10T15:34:51+08:00
Stats  : +94/-145 in 5 file(s)
URL    : https://src.fedoraproject.org/rpms/libxsmm/c/033dfe608c9ed7cd41a8337caf773d6952a517cc?branch=rawhide

Log:
Update libxsmm to 2.1.0 (rhbz#2512898)

---
diff --git a/.gitignore b/.gitignore
index 0be29c0..2b46fa7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,5 @@
 /libxsmm-1.15.tar.gz
 /libxsmm-1.16.tar.gz
 /libxsmm-1.17.tar.gz
+/libxsmm-2.0.0.tar.gz
+/libxsmm-2.1.0.tar.gz

diff --git a/install-docs.patch b/install-docs.patch
new file mode 100644
index 0000000..7c570a9
--- /dev/null
+++ b/install-docs.patch
@@ -0,0 +1,26 @@
+Install documentation to CMAKE_INSTALL_DOCDIR
+
+From upstream PR: https://github.com/libxsmm/libxsmm/pull/1082
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 881a720..92df722 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -400,3 +400,17 @@ if(LIBXSMM_FORTRAN)
+     ${CMAKE_CURRENT_BINARY_DIR}/libxsmmf.pc
+     DESTINATION ${LIBXSMM_INSTALL_PKGCONFIGDIR})
+ endif()
++
++# Install documentation.
++install(
++  DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/documentation/"
++  DESTINATION "${CMAKE_INSTALL_DOCDIR}"
++  FILES_MATCHING
++    PATTERN "*.md"
++    PATTERN "*.pdf"
++    PATTERN "*.css"
++    PATTERN "*.png"
++    # Exclude symlinks
++    PATTERN "CONTRIBUTING.md" EXCLUDE
++    PATTERN "LICENSE.md" EXCLUDE
++)

diff --git a/libxsmm-rpath.patch b/libxsmm-rpath.patch
deleted file mode 100644
index 16fb787..0000000
--- a/libxsmm-rpath.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-diff -up libxsmm-1.17/Makefile.inc.rpath libxsmm-1.17/Makefile.inc
---- libxsmm-1.17/Makefile.inc.rpath	2021-12-02 13:45:19.000000000 -0700
-+++ libxsmm-1.17/Makefile.inc	2023-09-10 20:04:37.070956645 -0600
-@@ -917,8 +917,6 @@ ifneq (Darwin,$(UNAME))
-   endif
-   XLNKVERBOSE := --verbose
-   linkopt = $(if $1,$(XLNKOPT)$(if $2,$1=$(call quote,$2),$1))
--  abslibrpath = $(strip $(if $(findstring .$(ILIBEXT),$1)$(wildcard $1/), \
--    $(call linkopt,--rpath,$(call qxdir,$(call qapath,$1)))))
-   XGROUP_BEGIN := $(call linkopt,--start-group)
-   XGROUP_END := $(call linkopt,--end-group)
-   ifneq (0,$(ASNEEDED))
-@@ -931,8 +929,6 @@ else # OSX
-   endif
-   XLNKVERBOSE := -t
-   linkopt = $(if $1,$(XLNKOPT) $(if $2,$1 $(XLNKOPT) $(call quote,$2),$1))
--  abslibrpath = $(strip $(if $(findstring .$(ILIBEXT),$1)$(wildcard $1/), \
--    $(call linkopt,-rpath,$(call qxdir,$(call qapath,$1)))))
- endif
- XLIB_BEGIN ?= $(NULL)
- XLIB_END ?= $(NULL)
-@@ -941,7 +937,7 @@ absliblpath = $(strip $(if $1,$(if $(fin
-   -L$(call qxdir,$(call qapath,$1)))))
- 
- ifneq (0,$(ABSLIBS))
--  abslibpath = $(strip $(call abslibrpath,$1) $(call absliblpath,$1))
-+  abslibpath = $(strip $(call absliblpath,$1))
- endif
- abslibpath ?= $(call absliblpath,$1)
- 
-@@ -2338,22 +2334,16 @@ ifneq (,$(GFC)$(filter-out 0,$(XSMM_GCC)
-   ifneq (,$(LIBGFORTRAN))
-     ifneq (0,$(DEPSTATIC))
-       BLAS_CLDFLAGS += $(XLIB_BEGIN) $(LIBGFORTRAN) $(XLIB_END)
--    else
--      BLAS_LDFLAGS += $(call abslibrpath,$(LIBGFORTRAN))
-     endif
-   endif
-   ifneq (,$(QUADMATH))
-     ifneq (0,$(DEPSTATIC))
-       BLAS_CLDFLAGS += $(XLIB_BEGIN) $(QUADMATH) $(XLIB_END)
--    else
--      BLAS_LDFLAGS += $(call abslibrpath,$(QUADMATH))
-     endif
-   endif
-   ifneq (,$(LIBM))
-     ifneq (0,$(DEPSTATIC))
-       BLAS_CLDFLAGS += $(XLIB_BEGIN) $(LIBM) $(XLIB_END)
--    else
--      BLAS_LDFLAGS += $(call abslibrpath,$(LIBM))
-     endif
-   endif
- endif

diff --git a/libxsmm.spec b/libxsmm.spec
index b0d7026..91f19ac 100644
--- a/libxsmm.spec
+++ b/libxsmm.spec
@@ -6,56 +6,52 @@
 # The specific compiler flags used are presumably chosen sensibly for the
 # code, and there's no likely security implication for this.
 
-# ix86 isn't built -- see
-# https://github.com/hfp/libxsmm/issues/103#issuecomment-256887962
-
-# For historical reasons, these have been out of step with the ABI
-# versioning used by the base source.  The soversion reflects the stable
-# "base" functionality, while the rest is considered unstable upstream.
-%global somajor 1
-%global sominor 10
-%global soupd 1
+# LIBXSMM 2.0 removes parts of the former public API and starts a new ABI
+# generation.  Keep the package file list aligned with the upstream SONAME.
+%global somajor 2
 
 # Avoid FTBFS with gcc 15 https://github.com/libxsmm/libxsmm/issues/933
 %global optflags %optflags -std=gnu17
 
 Name:		libxsmm
-Version:	1.17
-Release:	9%{?dist}
+Version:	2.1.0
+Release:	1%{?dist}
 Summary:	Small dense or sparse matrix multiplications and convolutions for x86_64
 License:	BSD-3-Clause
-URL:		https://github.com/hfp/libxsmm
-Source0:	https://github.com/hfp/libxsmm/archive/%version/%name-%version.tar.gz
-# Remove rpath
-Patch0:		libxsmm-rpath.patch
-BuildRequires:	make
-BuildRequires:	python3-devel openblas-devel
-BuildRequires:	gcc-gfortran gcc-c++
-ExclusiveArch:	x86_64
-
-# Remove /bin/sh, /bin/bash dependencies from -doc (not actually
-# required by packaging guidelines)
-%global __requires_exclude /bin/.*sh$
-%{?filter_setup:
-%filter_from_requires /\/bin\/.*sh$/d
-%filter_setup
-}
+URL:		https://github.com/libxsmm/libxsmm
+Source0:	https://github.com/libxsmm/libxsmm/archive/%{version}/%{name}-%{version}.tar.gz
+Patch:		install-docs.patch
+BuildRequires:	cmake
+BuildRequires:	gcc
+BuildRequires:	gcc-c++
+BuildRequires:	gcc-gfortran
+BuildRequires:	python3-devel
+ExclusiveArch:	x86_64 aarch64 riscv64 ppc64le
 
 
 %description
-LIBXSMM is a library for small dense and small sparse matrix-matrix
-multiplications, as well as for deep learning primitives such as small
-convolutions targeting Intel Architecture (x86).  The library
-generates code for the following instruction set extensions: Intel
-SSE, Intel AVX, Intel AVX2, IMCI (KNCni) for Intel Xeon Phi
-coprocessors ("KNC"), and Intel AVX‑512 as found in the Intel Xeon Phi
-processor family ("KNL") and future Intel Xeon processors.  Small
-convolutions are currently only optimized for Intel AVX‑512.
-Historically the library was solely targeting the Intel Many
-Integrated Core Architecture "MIC") using intrinsic functions.
-Currently, optimized assembly code targets all aforementioned
-instruction set extensions (static code generation), and Just‑In‑Time
-(JIT) code generation targets Intel AVX and beyond.
+LIBXSMM is high performance library for small dense and sparse linear
+algebra opertions incl. GEMM and elementwise primities often seen in
+deep learning applications. It also serves as reference implementation
+of Tensor Processing Primitives (TPP), a programming abstraction for
+efficient and portable deep learning and HPC workloads. With version
+2.0, LIBXSMM focuses on providing a complete and architecture-portable
+set of TPPs (small dense and sparse matrix operations as well as
+element-wise, GEMM, and BRGEMM primitives) from which higher-level
+operators such as convolutions, fully-connected layers, normalization,
+and pooling are composed. LIBXSMM targets Intel Architecture with
+Intel SSE, Intel AVX, Intel AVX2, Intel AVX-512 (with VNNI and
+Bfloat16), and Intel AMX (Advanced Matrix Extensions), AArch64 (NEON,
+SVE, and SME), RISC-V (RVV), and PowerPC 64-bit little-endian (POWER10
+with VSX and MMA). Code generation is mainly based on Just-In-Time
+(JIT) code specialization for compiler-independent performance (matrix
+multiplications, matrix transpose/copy, sparse functionality, and
+tensor primitives). LIBXSMM is suitable for "build once and deploy
+everywhere", i.e., no special target flags are needed to exploit the
+available performance. Supported GEMM datatypes are: FP64, FP32, FP16,
+bfloat16, BF8, HF8, MXBF8, MXHF8, int16, int8, MXBF6, MXHF6, MXFP4,
+int4, int2 and int1. Additionally, various non-standard low precision
+combinations are supported.
 
 
 %package	devel
@@ -69,6 +65,7 @@ developing applications that use %name.
 
 %package	doc
 Summary:	Documentation for %name
+Requires:	%name = %version-%release
 BuildArch:	noarch
 
 %description	doc
@@ -77,75 +74,52 @@ Documentation for %name.
 
 %prep
 %autosetup -p1
-# MS-Windows stuff that rpmlint would complain about
-find samples -name \*.vcxproj | xargs rm
-# README would clobber the main one, and the others would be dangling links
-rm documentation/{README,LICENSE,CONTRIBUTING}.md
-
-# documentation/gxm.md is a symlink, wrong when the doc is installed.
-rm documentation/gxm.md
-cp -p samples/deeplearning/gxm/README.md documentation/gxm.md
+# MS-Windows project files are neither useful documentation on Fedora nor
+# suitable for the documentation package.
+find samples -name '*.vcxproj' -delete
 
+%conf
+%cmake \
+  -DCMAKE_INSTALL_Fortran_MODULES:PATH=%{_fmoddir}/%{name} \
+  -DBUILD_TESTING:BOOL=ON \
+  -DLIBXSMM_FORTRAN:BOOL=ON \
+  -DLIBXSMM_CTEST_WITH_BLAS_REFERENCE:BOOL=OFF
 
 %build
-# OpenMP is only used by libxsmmext, so no need to turn it off.
-# Avoid the ld hardening flags, which are taken care of by the library
-# build system to the extent they don't affect perfromance.
-# -lm and -ldl are neded for the test, for which the LDFLAGS need to be
-# consistent.  PREFIX and POUTDIR are needed at build time to get the .pc
-# files correct.  OMPLIB is necessary to avoid failure in epel7 trying to
-# link -lgomp.so, which I haven't figured out.
-%global makeflags STATIC=0 SYM=1 AVX=0 PYTHON=%python3 PREFIX=%_prefix POUTDIR=%_lib PPKGDIR=%_lib/pkgconfig VERSION_API=1 OMPLIB=-lgomp
-%make_build %makeflags
-
+%cmake_build
 
 %install
-# Supply STATIC etc. since this actually builds stuff (a bug?),
-# and otherwise we end up with bits built wrongly.
-%make_install %makeflags
-mkdir -p %buildroot%_fmoddir %buildroot%_libdir/pkgconfig
-mv %buildroot%_includedir/libxsmm.mod %buildroot%_fmoddir
-rm -r %buildroot%_datadir/libxsmm
-
-# Build artefacts
-find samples -name .make | xargs rm
-cp Makefile.inc samples		# included by the sub-directories
-echo "These are set up to be built in the original source tree.
-You will have to adjust the make files to use an installed version." >samples/README
+%cmake_install
 
 %check
-# Fixme: the test gives numerical errors inconsistently with openblas
-# 0.3.1/gcc 8.1 on koji when the thread count isn't 1; sometimes 2
-# works.
-OMP_NUM_THREADS=1 make test-cp2k %makeflags
-rm -r samples/cp2k/{.make,.state,cp2k-dbcsr,cp2k-collocate,cp2k-test.txt}
-# For some reason this only seems necessary for el8
-rm -rf samples/cp2k/obj
-
-%ldconfig_scriptlets
+%ctest
 
 
 %files
 %license LICENSE.md
-%_libdir/libxsmm*.so.%{somajor}*
+%{_libdir}/libxsmm.so.%{somajor}{,.*}
+%{_libdir}/libxsmmf.so.%{somajor}{,.*}
 
 %files devel
-%doc README.md
-%_libdir/libxsmm*.so
-%_includedir/*
-%_bindir/libxsmm_gemm_generator
-# Get the module directory owned.  Currently in Fedora, gfortran owns
-# %%_fmoddir, but not %%_fmoddir/..
-%_fmoddir/libxsmm.mod
-%_libdir/pkgconfig/*.pc
-
+%{_libdir}/libxsmm.so
+%{_libdir}/libxsmmf.so
+%{_includedir}/%{name}/
+%{_fmoddir}/%{name}/
+%{_bindir}/libxsmm_gemm_generator
+%{_bindir}/libxsmm_binaryexport_generator
+%{_libdir}/cmake/%{name}/
+%{_libdir}/pkgconfig/
 
 %files doc
-%doc README.md documentation/*.md documentation/*.pdf samples CONTRIBUTING.md
-%license LICENSE.md
+%doc %{_docdir}/%{name}/
 
 
 %changelog
+* Sat Jul 29 2006 SY Wang <uwsy1059@qq.com> - 2.1.0-1
+- Update to 2.1.0 (rhbz#2512898)
+- Add support for aarch64, ppc64le, and RISC-V
+- Build libxsmm with CMake
+
 * Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.17-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

diff --git a/sources b/sources
index 4a58ed2..2e94aa9 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (libxsmm-1.17.tar.gz) = fa06948c831d6affe35462a2cc3c62b14726c70fa9b6023766514b475379b7b7c136bb217bd59774cd5d8ffc29bea55f24d22e2282f6d0524dcb1cc6a28d4073
+SHA512 (libxsmm-2.1.0.tar.gz) = 16a06ca54b295ee27cce1e5a5a7d95f6ae606d4e42ab5ac2e4923cb6b872144b5a65dbe5ff9cb84c797c19d065d998d31281c1c8ef45feb6b8a160c92f957faf

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-22  8:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-22  8:51 [rpms/libxsmm] rawhide: Update libxsmm to 2.1.0 (rhbz#2512898) SY Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox