public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/clpeak] rawhide: fix for AMX-TF32 incorrect detection
@ 2026-07-22  3:05 Filipe Rosset
  0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-07-22  3:05 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/clpeak
Branch : rawhide
Commit : 9c22b099e2923e1cdcce4e351b06008f3410f756
Author : Filipe Rosset <rosset.filipe@gmail.com>
Date   : 2026-07-21T23:40:01-03:00
Stats  : +75/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/clpeak/c/9c22b099e2923e1cdcce4e351b06008f3410f756?branch=rawhide

Log:
fix for AMX-TF32 incorrect detection

---
diff --git a/clpeak-fix-amx-tf32.patch b/clpeak-fix-amx-tf32.patch
new file mode 100644
index 0000000..217c3d3
--- /dev/null
+++ b/clpeak-fix-amx-tf32.patch
@@ -0,0 +1,72 @@
+--- a/src/cpu/CMakeLists.txt
++++ b/src/cpu/CMakeLists.txt
+@@ -128,6 +128,48 @@
+     target_compile_definitions(peak_cpu PRIVATE CLPEAK_TU_${tag}=1)
+ endfunction()
+ 
++function(clpeak_check_amx_fp16 outvar)
++    set(CMAKE_REQUIRED_FLAGS "${ARGN}")
++    check_cxx_source_compiles("
++        #include <immintrin.h>
++        int main() {
++            #if defined(__x86_64__) || defined(_M_X64)
++            _tile_dpfp16ps(0, 4, 5);
++            #endif
++            return 0;
++        }
++    " ${outvar})
++    set(${outvar} ${${outvar}} PARENT_SCOPE)
++endfunction()
++
++function(clpeak_check_amx_tf32 outvar)
++    set(CMAKE_REQUIRED_FLAGS "${ARGN}")
++    check_cxx_source_compiles("
++        #include <immintrin.h>
++        int main() {
++            #if defined(__x86_64__) || defined(_M_X64)
++            _tile_mmultf32ps(0, 4, 5);
++            #endif
++            return 0;
++        }
++    " ${outvar})
++    set(${outvar} ${${outvar}} PARENT_SCOPE)
++endfunction()
++
++function(clpeak_check_amx_fp8 outvar)
++    set(CMAKE_REQUIRED_FLAGS "${ARGN}")
++    check_cxx_source_compiles("
++        #include <immintrin.h>
++        int main() {
++            #if defined(__x86_64__) || defined(_M_X64)
++            _tile_dphf8ps(0, 4, 5);
++            #endif
++            return 0;
++        }
++    " ${outvar})
++    set(${outvar} ${${outvar}} PARENT_SCOPE)
++endfunction()
++
+ set(CLPEAK_CPU_TU_DEFS "")   # extra per-TU defs (e.g. CLPEAK_CORE_ONLY for MSVC)
+ 
+ # A -march flag check alone doesn't prove the bleeding-edge ARM TUs can build:
+@@ -365,17 +407,17 @@
+             # -mamx-tf32 / -mamx-fp8 flags need clang>=~18/20 (older toolchains
+             # fail the check and simply skip the TU -> Unsupported row).
+             set(_amxfp16 ${_clpeak_gnuflag}-mamx-tile ${_clpeak_gnuflag}-mamx-fp16)
+-            check_cxx_compiler_flag("${_amxfp16}" _clpeak_f_amxfp16)
++            clpeak_check_amx_fp16(_clpeak_f_amxfp16 "${_amxfp16}")
+             if(_clpeak_f_amxfp16)
+                 clpeak_add_isa_tu(amxfp16 ${_amxfp16})
+             endif()
+             set(_amxtf32 ${_clpeak_gnuflag}-mamx-tile ${_clpeak_gnuflag}-mamx-tf32)
+-            check_cxx_compiler_flag("${_amxtf32}" _clpeak_f_amxtf32)
++            clpeak_check_amx_tf32(_clpeak_f_amxtf32 "${_amxtf32}")
+             if(_clpeak_f_amxtf32)
+                 clpeak_add_isa_tu(amxtf32 ${_amxtf32})
+             endif()
+             set(_amxfp8 ${_clpeak_gnuflag}-mamx-tile ${_clpeak_gnuflag}-mamx-fp8)
+-            check_cxx_compiler_flag("${_amxfp8}" _clpeak_f_amxfp8)
++            clpeak_check_amx_fp8(_clpeak_f_amxfp8 "${_amxfp8}")
+             if(_clpeak_f_amxfp8)
+                 clpeak_add_isa_tu(amxfp8 ${_amxfp8})
+             endif()

diff --git a/clpeak.spec b/clpeak.spec
index 23bd9aa..de43bde 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-tf32.patch
 
 
 BuildRequires: cmake
@@ -12,10 +13,10 @@ BuildRequires: gcc
 BuildRequires: gcc-c++
 BuildRequires: glslc
 BuildRequires: opencl-headers
-BuildRequires: vulkan-headers
 BuildRequires: pkgconfig(gl)
 BuildRequires: pkgconfig(OpenCL)
 BuildRequires: pkgconfig(vulkan)
+BuildRequires: vulkan-headers
 
 
 %description
@@ -32,7 +33,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-07-22  3:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-22  3:05 [rpms/clpeak] rawhide: fix for AMX-TF32 incorrect detection Filipe Rosset

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