public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Filipe Rosset <rosset.filipe@gmail.com>
To: git-commits@fedoraproject.org
Subject: [rpms/clpeak] rawhide: fix for AMX-TF32 incorrect detection
Date: Wed, 22 Jul 2026 03:05:27 GMT	[thread overview]
Message-ID: <178468952727.1.9278367911492332518.rpms-clpeak-9c22b099e292@fedoraproject.org> (raw)

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

                 reply	other threads:[~2026-07-22  3:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178468952727.1.9278367911492332518.rpms-clpeak-9c22b099e292@fedoraproject.org \
    --to=rosset.filipe@gmail.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox