public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/clpeak] rawhide: fix FTBFS on i686 32-bit arch
@ 2026-06-13 18:30 Filipe Rosset
  0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-06-13 18:30 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/clpeak
            Branch : rawhide
            Commit : 49cab4fda9e63b0dd1062ae758149f26d1b0aea3
            Author : Filipe Rosset <filiperosset@fedoraproject.org>
            Date   : 2026-06-13T15:30:14-03:00
            Stats  : +44/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/clpeak/c/49cab4fda9e63b0dd1062ae758149f26d1b0aea3?branch=rawhide

            Log:
            fix FTBFS on i686 32-bit arch

Signed-off-by: Filipe Rosset <filiperosset@fedoraproject.org>

---
diff --git a/clpeak-fix-amx-32bit.patch b/clpeak-fix-amx-32bit.patch
new file mode 100644
index 0000000..b6eeb51
--- /dev/null
+++ b/clpeak-fix-amx-32bit.patch
@@ -0,0 +1,42 @@
+diff -urN a/src/cpu/CMakeLists.txt b/src/cpu/CMakeLists.txt
+--- a/src/cpu/CMakeLists.txt	2026-06-10 13:49:05.000000000 -0300
++++ b/src/cpu/CMakeLists.txt	2026-06-13 15:18:12.788239406 -0300
+@@ -220,7 +220,7 @@
+             if(_clpeak_f_fp16x)
+                 clpeak_add_isa_tu(avx512fp16 ${_avx512_core} ${_clpeak_gnuflag}-mavx512fp16)
+             endif()
+-            if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
++            if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
+                 set(_amx ${_avx512_core} -mamx-tile -mamx-int8 -mamx-bf16)
+                 check_cxx_compiler_flag("${_amx}" _clpeak_f_amx)
+                 if(_clpeak_f_amx)
+diff -urN a/src/cpu/cpu_kernels_impl.h b/src/cpu/cpu_kernels_impl.h
+--- a/src/cpu/cpu_kernels_impl.h	2026-06-10 13:49:05.000000000 -0300
++++ b/src/cpu/cpu_kernels_impl.h	2026-06-13 15:18:17.943243777 -0300
+@@ -19,7 +19,7 @@
+ #define CLPEAK_ISA_NAME_STR "scalar"
+ #endif
+ 
+-#if (defined(__AMX_INT8__) || defined(__AMX_BF16__)) && defined(__linux__)
++#if (defined(__AMX_INT8__) || defined(__AMX_BF16__)) && defined(__linux__) && defined(__x86_64__)
+ #include <immintrin.h>
+ #endif
+ 
+@@ -421,7 +421,7 @@
+ 
+ // ---- Matrix engine: int8 (AMX / SMMLA) and bf16 (AMX / BFMMLA) -------------
+ // ops are PER-k; the table multiplies by INNER (the chain loops INNER per outer).
+-#if defined(__AMX_INT8__) && defined(__linux__)
++#if defined(__AMX_INT8__) && defined(__linux__) && defined(__x86_64__)
+ #define CPU_MAT_INT8_KERNEL 1
+ static constexpr double MAT_I8_OPS_PER_K = 4.0 * 16 * 16 * 64 * 2;
+ static thread_local bool g_amxI8Cfg = false;
+@@ -476,7 +476,7 @@
+ }
+ #endif
+ 
+-#if defined(__AMX_BF16__) && defined(__linux__)
++#if defined(__AMX_BF16__) && defined(__linux__) && defined(__x86_64__)
+ #define CPU_MAT_FP_KERNEL 1
+ static constexpr double MAT_FP_OPS_PER_K = 4.0 * 16 * 16 * 32 * 2;
+ static thread_local bool g_amxBf16Cfg = false;

diff --git a/clpeak.spec b/clpeak.spec
index 5d1c150..3eae609 100644
--- a/clpeak.spec
+++ b/clpeak.spec
@@ -5,6 +5,7 @@ Summary:    Measure the peak achievable performance of GPU compute devices
 License:    Apache-2.0
 URL:        https://github.com/krrishnarraj/%{name}
 Source:     %{url}/archive/%{version}/%{name}-%{version}.tar.gz
+Patch:      clpeak-fix-amx-32bit.patch
 
 BuildRequires: cmake
 BuildRequires: gcc
@@ -31,7 +32,7 @@ scheduling, extension exposure) become visible alongside the raw peak
 numbers.
 
 %prep
-%autosetup
+%autosetup -p1
 
 
 %build

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

only message in thread, other threads:[~2026-06-13 18:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-13 18:30 [rpms/clpeak] rawhide: fix FTBFS on i686 32-bit arch Filipe Rosset

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