[PATCH 00/11] CPU tuning patches

  • Done
  • quality assurance status badge
Details
2 participants
  • Efraim Flashner
  • Ludovic Courtès
Owner
unassigned
Submitted by
Efraim Flashner
Severity
normal
E
E
Efraim Flashner wrote on 6 Mar 12:03 +0100
(address . guix-patches@gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
cover.1709722620.git.efraim@flashner.co.il
This series corrects the remaining x86_64-v* to x86-64-v*, which is what
the compiler expects. It also removes x86-64-v1, which is the baseline,
and instead inserts x86-64. Software for i686 running on x86_64 can
still benefit from the tuning from x86_64, so I've added those options
for gcc.

I've added support for tuning rust packages, and I've marked rav1e as
tunable since it apparently shows a large boost when tuned to newer
hardware. I've also added opus and libvorbis since they benefit
greatly, and syncthing since, beyond syncing, there is a lot of other
hashing and whatnot that it does that benefits from tuning.

I've updated the llvm micro-architecture list for x86_64, and I've added
for powerpc64le. I was going to add for aarch64 but it only supports
listing specific chips so that didn't fit with what we have elsewhere.

Efraim Flashner (11):
gnu: opus: Mark as tunable.
gnu: libvorbis: Mark as tunable.
guix: cpu: Be consistent with x86_64 micro-architecture names.
guix: cpu: Rename x86-64-v1 to x86-64.
guix: cpu: Enable tuning for i686-linux.
gnu: syncthing: Mark as tunable.
gnu: rust: Add tuning information.
transformations: Add support for rust.
gnu: rav1e: Mark as tunable.
gnu: clang-properties: Update x86_64 micro-architectures.
gnu: clang-properties: Add micro-architecture support for powerpc64le.

gnu/packages/gcc.scm | 7 +-
gnu/packages/golang.scm | 3 +-
gnu/packages/llvm.scm | 127 +++++++++++++++++++------------------
gnu/packages/rust.scm | 4 +-
gnu/packages/syncthing.scm | 3 +-
gnu/packages/video.scm | 1 +
gnu/packages/xiph.scm | 2 +
guix/cpu.scm | 24 +++----
guix/transformations.scm | 8 ++-
9 files changed, 101 insertions(+), 78 deletions(-)


base-commit: f3ea06baca2b96cd20170616fd5da13ec2daac54
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 6 Mar 12:06 +0100
[PATCH 01/11] gnu: opus: Mark as tunable.
(address . 69581@debbugs.gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
5da75d2addf741dd38e7c2a1fbaa804864e103e6.1709722620.git.efraim@flashner.co.il
* gnu/packages/xiph.scm (opus)[properties]: Mark package as tunable.

Change-Id: I5df964b5692c6f390eef55d780810b03d6a895dc
---
gnu/packages/xiph.scm | 1 +
1 file changed, 1 insertion(+)

Toggle diff (16 lines)
diff --git a/gnu/packages/xiph.scm b/gnu/packages/xiph.scm
index b47c718fb6..84b8ccb273 100644
--- a/gnu/packages/xiph.scm
+++ b/gnu/packages/xiph.scm
@@ -345,6 +345,7 @@ (define-public opus
but is also intended for storage and streaming applications. It is
standardized by the Internet Engineering Task Force (IETF) as RFC 6716 which
incorporated technology from Skype's SILK codec and Xiph.Org's CELT codec.")
+ (properties `((tunable? . #t)))
(license license:bsd-3)
(home-page "https://www.opus-codec.org")))
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 6 Mar 12:06 +0100
[PATCH 03/11] guix: cpu: Be consistent with x86_64 micro-architecture names.
(address . 69581@debbugs.gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
d671f2d4415cbd9bdcad95483f2bb029ac003b42.1709722620.git.efraim@flashner.co.il
* gnu/packages/golang.scm (%go-1.18-x86_64-micro-architectures): Rename
micro-architectures from x86_64-v* to x86-64-v*.
* guix/cpu.scm (cpu->gcc-architecture): Return x86-64 as the fallback.
(cpu->micro-architecture-level): Rename micro-architectures from
x86_64-v* to x86-64-v*.
(gcc-architecture->micro-architecture-level): Same.

Change-Id: I37db65970417c22699ae8097b0361bccf76c1267
---
gnu/packages/golang.scm | 2 +-
guix/cpu.scm | 20 ++++++++++----------
2 files changed, 11 insertions(+), 11 deletions(-)

Toggle diff (75 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 0bcd231a93..d781cc6055 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -870,7 +870,7 @@ (define-public go-1.17
("powerpc64le" ,@%go-1.17-powerpc64le-micro-architectures))))))
(define %go-1.18-x86_64-micro-architectures
- (list "x86_64-v1" "x86_64-v2" "x86_64-v3" "x86_64-v4"))
+ (list "x86-64-v1" "x86-64-v2" "x86-64-v3" "x86-64-v4"))
(define-public go-1.18
(package
diff --git a/guix/cpu.scm b/guix/cpu.scm
index e80b74f161..b69c9b5360 100644
--- a/guix/cpu.scm
+++ b/guix/cpu.scm
@@ -200,7 +200,7 @@ (define (cpu->gcc-architecture cpu)
;; TODO: Recognize CENTAUR/CYRIX/NSC?
- "x86_64")))
+ "x86-64")))
("aarch64"
;; Transcribed from GCC's list of aarch64 processors in aarch64-cores.def
;; What to do with big.LITTLE cores?
@@ -290,12 +290,12 @@ (define (cpu->micro-architecture-level cpu)
;; v2: CMPXCHG16B, LAHF, SAHF, POPCNT, SSE3, SSE4.1, SSE4.2, SSSE3
("avx512f" "avx512bw" "abx512cd" "abx512dq" "avx512vl"
"avx" "avx2" "bmi1" "bmi2" "f16c" "fma" "movbe"
- "popcnt" "sse3" "sse4_1" "sse4_2" "ssse3" => "x86_64-v4")
+ "popcnt" "sse3" "sse4_1" "sse4_2" "ssse3" => "x86-64-v4")
("avx" "avx2" "bmi1" "bmi2" "f16c" "fma" "movbe"
- "popcnt" "sse3" "sse4_1" "sse4_2" "ssse3" => "x86_64-v3")
- ("popcnt" "sse3" "sse4_1" "sse4_2" "ssse3" => "x86_64-v2")
- (_ => "x86_64-v1")))
- "x86_64-v1"))
+ "popcnt" "sse3" "sse4_1" "sse4_2" "ssse3" => "x86-64-v3")
+ ("popcnt" "sse3" "sse4_1" "sse4_2" "ssse3" => "x86-64-v2")
+ (_ => "x86-64-v1")))
+ "x86-64-v1"))
(architecture
;; TODO: More architectures
architecture)))
@@ -304,22 +304,22 @@ (define (gcc-architecture->micro-architecture-level gcc-architecture)
"Return a matching psABI micro-architecture, allowing optimizations for x86_64
CPUs for compilers which don't allow for more focused optimizing."
;; Matching gcc-architectures isn't an easy task, with the rule-of-thumb being
- ;; AVX512F+ for x86_64-v4, AVX+ for x86_64-v3.
+ ;; AVX512F+ for x86-64-v4, AVX+ for x86-64-v3.
;; https://gitlab.com/x86-psABIs/x86-64-ABI/-/blob/master/x86-64-ABI/low-level-sys-info.tex
(match gcc-architecture
((or "graniterapids-d" "graniterapids" "tigerlake" "sapphirerapids"
"cooperlake" "icelake-server" "icelake-client" "cannonlake" "knm"
"knl" "skylake-avx512"
"znver4")
- "x86_64-v4")
+ "x86-64-v4")
((or "pantherlake" "clearwaterforest" "arrowlake-s" "sierraforest"
"alderlake" "skylake" "broadwell" "haswell"
"znver3" "znver2" "znver1" "bdver4")
- "x86_64-v3")
+ "x86-64-v3")
((or "sandybridge" "tremont" "goldmont-plus" "goldmont" "silvermont"
"nehalem" "bonnell" "core2"
"btver2" "athalon" "k8-sse3" "k8" "bdver3" "bdver2" "bdver1" "btver1"
"amdfam10"
"lujiazui" "yongfeng" "x86-64")
- "x86_64-v1")
+ "x86-64-v1")
(_ gcc-architecture)))
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 6 Mar 12:06 +0100
[PATCH 02/11] gnu: libvorbis: Mark as tunable.
(address . 69581@debbugs.gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
ddb9919fab9e15360d9d8c9fc04762ac82b8d940.1709722620.git.efraim@flashner.co.il
* gnu/packages/xiph.scm (libvorbis)[properties]: Mark package as tunable.

Change-Id: Ie378a8c671ba6408a137e3c27824cb17671cafe3
---
gnu/packages/xiph.scm | 1 +
1 file changed, 1 insertion(+)

Toggle diff (16 lines)
diff --git a/gnu/packages/xiph.scm b/gnu/packages/xiph.scm
index 84b8ccb273..4eff0a3877 100644
--- a/gnu/packages/xiph.scm
+++ b/gnu/packages/xiph.scm
@@ -97,6 +97,7 @@ (define-public libvorbis
compressed audio format for mid to high quality (8kHz-48.0kHz, 16+ bit,
polyphonic) audio and music at fixed and variable bitrates from 16 to
128 kbps/channel.")
+ (properties `((tunable? . #t)))
(license (license:non-copyleft "file://COPYING"
"See COPYING in the distribution."))
(home-page "https://xiph.org/vorbis/")))
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 6 Mar 12:06 +0100
[PATCH 04/11] guix: cpu: Rename x86-64-v1 to x86-64.
(address . 69581@debbugs.gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
9bc22284736b8908d1be4e3f3cc408fd853e7888.1709722620.git.efraim@flashner.co.il
This is the actual micro-architecture designation used by compilers.

* gnu/packages/gcc.scm (%gcc-11-x86_64-micro-architectures): Rename
x86-64-v1 to x86-64.
* gnu/packages/golang.scm (%go-1.18-x86_64-micro-architectures): Same.
* guix/cpu.scm (cpu->micro-architecture-level): Same.
(gcc-architecture->micro-architecture-level): Same.

Change-Id: I19ed556a7e8deb4a77f4c63fca3b794f25092788
---
gnu/packages/gcc.scm | 2 +-
gnu/packages/golang.scm | 3 ++-
guix/cpu.scm | 6 +++---
3 files changed, 6 insertions(+), 5 deletions(-)

Toggle diff (53 lines)
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 3abecdeadd..3555d12c44 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -624,7 +624,7 @@ (define %gcc-11-x86_64-micro-architectures
"btver1" "btver2" ;AMD
;; psABI micro-architecture levels
- "x86-64-v1" "x86-64-v2" "x86-64-v3" "x86-64-v4")))
+ "x86-64" "x86-64-v2" "x86-64-v3" "x86-64-v4")))
;; Suitable '-march' values for GCC 12.
(define %gcc-12-aarch64-micro-architectures
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index d781cc6055..c4ae3a4673 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -870,7 +870,8 @@ (define-public go-1.17
("powerpc64le" ,@%go-1.17-powerpc64le-micro-architectures))))))
(define %go-1.18-x86_64-micro-architectures
- (list "x86-64-v1" "x86-64-v2" "x86-64-v3" "x86-64-v4"))
+ ;; GOAMD defaults to 'v1' so we match the default elsewhere.
+ (list "x86-64" "x86-64-v2" "x86-64-v3" "x86-64-v4"))
(define-public go-1.18
(package
diff --git a/guix/cpu.scm b/guix/cpu.scm
index b69c9b5360..6f9e8daa61 100644
--- a/guix/cpu.scm
+++ b/guix/cpu.scm
@@ -294,8 +294,8 @@ (define (cpu->micro-architecture-level cpu)
("avx" "avx2" "bmi1" "bmi2" "f16c" "fma" "movbe"
"popcnt" "sse3" "sse4_1" "sse4_2" "ssse3" => "x86-64-v3")
("popcnt" "sse3" "sse4_1" "sse4_2" "ssse3" => "x86-64-v2")
- (_ => "x86-64-v1")))
- "x86-64-v1"))
+ (_ => "x86-64")))
+ "x86-64"))
(architecture
;; TODO: More architectures
architecture)))
@@ -321,5 +321,5 @@ (define (gcc-architecture->micro-architecture-level gcc-architecture)
"btver2" "athalon" "k8-sse3" "k8" "bdver3" "bdver2" "bdver1" "btver1"
"amdfam10"
"lujiazui" "yongfeng" "x86-64")
- "x86-64-v1")
+ "x86-64")
(_ gcc-architecture)))
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 6 Mar 12:06 +0100
[PATCH 05/11] guix: cpu: Enable tuning for i686-linux.
(address . 69581@debbugs.gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
33a8d78738553f464f5974a0d2cba981e65ced78.1709722620.git.efraim@flashner.co.il
* gnu/packages/gcc.scm (gcc-7, gcc-10, gcc-11, gcc-12, gcc-13)
[properties]: In compiler-cpu-architectures use the
x86_64-micro-architectures list for i686.
* guix/cpu.scm (cpu->gcc-architecture): Expand the x86_64 case to also
support i686.

Change-Id: I0b820ceb715960db5e702814fa278dc8c619a836
---
gnu/packages/gcc.scm | 5 +++++
guix/cpu.scm | 6 ++++--
2 files changed, 9 insertions(+), 2 deletions(-)

Toggle diff (72 lines)
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 3555d12c44..c8902de6a0 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -673,6 +673,7 @@ (define-public gcc-7
`((compiler-cpu-architectures
("aarch64" ,@%gcc-7.5-aarch64-micro-architectures)
("armhf" ,@%gcc-7.5-armhf-micro-architectures)
+ ("i686" ,@%gcc-7.5-x86_64-micro-architectures)
("x86_64" ,@%gcc-7.5-x86_64-micro-architectures))
,@(package-properties gcc-6)))))
@@ -729,6 +730,7 @@ (define-public gcc-10
`((compiler-cpu-architectures
("aarch64" ,@%gcc-10-aarch64-micro-architectures)
("armhf" ,@%gcc-10-armhf-micro-architectures)
+ ("i686" ,@%gcc-10-x86_64-micro-architectures)
("x86_64" ,@%gcc-10-x86_64-micro-architectures))
,@(package-properties gcc-8)))))
@@ -764,6 +766,7 @@ (define-public gcc-11
`((compiler-cpu-architectures
("aarch64" ,@%gcc-11-aarch64-micro-architectures)
("armhf" ,@%gcc-11-armhf-micro-architectures)
+ ("i686" ,@%gcc-11-x86_64-micro-architectures)
("x86_64" ,@%gcc-11-x86_64-micro-architectures))
,@(package-properties gcc-8)))))
@@ -786,6 +789,7 @@ (define-public gcc-12
`((compiler-cpu-architectures
("aarch64" ,@%gcc-12-aarch64-micro-architectures)
("armhf" ,@%gcc-12-armhf-micro-architectures)
+ ("i686" ,@%gcc-12-x86_64-micro-architectures)
("x86_64" ,@%gcc-12-x86_64-micro-architectures))
,@(package-properties gcc-11)))))
@@ -808,6 +812,7 @@ (define-public gcc-13
`((compiler-cpu-architectures
("aarch64" ,@%gcc-13-aarch64-micro-architectures)
("armhf" ,@%gcc-13-armhf-micro-architectures)
+ ("i686" ,@%gcc-13-x86_64-micro-architectures)
("x86_64" ,@%gcc-13-x86_64-micro-architectures))
,@(package-properties gcc-11)))))
diff --git a/guix/cpu.scm b/guix/cpu.scm
index 6f9e8daa61..840215cff0 100644
--- a/guix/cpu.scm
+++ b/guix/cpu.scm
@@ -113,7 +113,7 @@ (define (cpu->gcc-architecture cpu)
"Return the architecture name, suitable for GCC's '-march' flag, that
corresponds to CPU, a record as returned by 'current-cpu'."
(match (cpu-architecture cpu)
- ("x86_64"
+ ((or "x86_64" "i686")
;; Transcribed from GCC's 'host_detect_local_cpu' in driver-i386.cc.
(letrec-syntax ((if-flags (syntax-rules (=>)
((_)
@@ -200,7 +200,9 @@ (define (cpu->gcc-architecture cpu)
;; TODO: Recognize CENTAUR/CYRIX/NSC?
- "x86-64")))
+ (match (cpu-architecture cpu)
+ ("x86_64" "x86-64")
+ (_ "generic")))))
("aarch64"
;; Transcribed from GCC's list of aarch64 processors in aarch64-cores.def
;; What to do with big.LITTLE cores?
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 6 Mar 12:06 +0100
[PATCH 06/11] gnu: syncthing: Mark as tunable.
(address . 69581@debbugs.gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
a655ad3c7676d4a374a35e9464aa628bdd3cfea8.1709722620.git.efraim@flashner.co.il
* gnu/packages/syncthing.scm (syncthing)[properties]: Mark package as
tunable.

Change-Id: Ia885bbd32f043e83b231359cca438ea9caf4e8dc
---
gnu/packages/syncthing.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/syncthing.scm b/gnu/packages/syncthing.scm
index d09b03bcdb..6986642b73 100644
--- a/gnu/packages/syncthing.scm
+++ b/gnu/packages/syncthing.scm
@@ -129,7 +129,8 @@ (define-public syncthing
(home-page "https://github.com/syncthing/syncthing")
(properties
'((release-monitoring-url . "https://syncthing.net/downloads/")
- (upstream-name . "syncthing-source")))
+ (upstream-name . "syncthing-source")
+ (tunable? . #t)))
(license mpl2.0)))
(define-public syncthing-gtk
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 6 Mar 12:06 +0100
[PATCH 07/11] gnu: rust: Add tuning information.
(address . 69581@debbugs.gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
b6f27a7aba739de0e1bc7437a050e5104065482f.1709722620.git.efraim@flashner.co.il
* gnu/packages/rust.scm (rust)[properties]: Add clang-properties
matching the input llvm package.

Change-Id: Ie2ef2387fff8aa639dcd73752bcaf3c26bbb376d
---
gnu/packages/rust.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (19 lines)
diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm
index 1f129a93bd..68917ee5e8 100644
--- a/gnu/packages/rust.scm
+++ b/gnu/packages/rust.scm
@@ -964,7 +964,9 @@ (define-public rust
(let ((base-rust rust-1.75))
(package
(inherit base-rust)
- (properties (alist-delete 'hidden? (package-properties base-rust)))
+ (properties `(`(append
+ ,(alist-delete 'hidden? (package-properties base-rust))
+ ,@(clang-properties "15"))))
(outputs (cons* "rust-src" "tools" (package-outputs base-rust)))
(source
(origin
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 6 Mar 12:06 +0100
[PATCH 08/11] transformations: Add support for rust.
(address . 69581@debbugs.gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
bfb86fe5f935fb01d4f918c683b58b176663020a.1709722620.git.efraim@flashner.co.il
* guix/transformations.scm (tuning-compiler): Add support for rustc.

Change-Id: I6db596a586eda648666550cdcadaa5e1704cb79c
---
guix/transformations.scm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

Toggle diff (37 lines)
diff --git a/guix/transformations.scm b/guix/transformations.scm
index 132ccd957a..f02b9f94d6 100644
--- a/guix/transformations.scm
+++ b/guix/transformations.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2016-2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2023 Sarthak Shah <shahsarthakw@gmail.com>
-;;; Copyright © 2023 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2023, 2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2023 Ekaitz Zarraga <ekaitz@elenq.tech>
;;;
;;; This file is part of GNU Guix.
@@ -499,6 +499,10 @@ (define tuning-compiler
"-Dcpu="
(string-replace-substring
#$micro-architecture "-" "_"))))
+ ((and (search-next "rustc")
+ (string=? next (search-next "rustc")))
+ (list "-C" (string-append "target_cpu="
+ #$micro-architecture)))
(else
(list (string-append "-march="
#$micro-architecture))))))))))))
@@ -519,7 +523,7 @@ (define tuning-compiler
(symlink #$program
(string-append bin "/" program)))
'("cc" "gcc" "clang" "g++" "c++" "clang++"
- "go" "zig")))))))
+ "go" "rustc" "zig")))))))
(define (build-system-with-tuning-compiler bs micro-architecture)
"Return a variant of BS, a build system, that ensures that the compiler that
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 6 Mar 12:06 +0100
[PATCH 09/11] gnu: rav1e: Mark as tunable.
(address . 69581@debbugs.gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
488b8240cdb4b3a77b25a1fa7032113f61fa2042.1709722620.git.efraim@flashner.co.il
* gnu/packages/video.scm (rav1e)[properties]: Mark package as tunable.

Change-Id: Icaf3615ce6f1e76416543a1285af5f1fdaec3589
---
gnu/packages/video.scm | 1 +
1 file changed, 1 insertion(+)

Toggle diff (16 lines)
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 925f5ff83b..1b57c0fdd6 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -5948,6 +5948,7 @@ (define-public rav1e
(description "@code{rav1e} is an AV1 video encoder. It is designed to
eventually cover all use cases, though in its current form it is most suitable
for cases where libaom (the reference encoder) is too slow.")
+ (properties `((tunable? . #t)))
(license license:bsd-2)))
(define-public peek
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 6 Mar 12:06 +0100
[PATCH 10/11] gnu: clang-properties: Update x86_64 micro-architectures.
(address . 69581@debbugs.gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
17d1869e788e1f364d3a3303cde5a553c41a4fa1.1709722620.git.efraim@flashner.co.il
* gnu/packages/llvm.scm (clang-properties): Add entries on x86_64 for
versions 17, 16, 15, 13, 9 and remove entry for version 10.

Change-Id: I93149c30f011c6de8ff0cc2c2b6f0186540359cd
---
gnu/packages/llvm.scm | 122 +++++++++++++++++++++---------------------
1 file changed, 61 insertions(+), 61 deletions(-)

Toggle diff (137 lines)
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 2778d0ec38..2567405cb4 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -482,67 +482,67 @@ (define* (clang-from-llvm llvm clang-runtime
(define (clang-properties version)
"Return package properties for Clang VERSION."
`((compiler-cpu-architectures
- ("x86_64"
- ;; This list was obtained by running:
- ;;
- ;; guix shell clang -- llc -march=x86-64 -mattr=help
- ;;
- ;; filtered from uninteresting entries such as "i686" and "pentium".
- ,@(if (version>=? version "10.0") ;TODO: refine
- '("atom"
- "barcelona"
- "bdver1"
- "bdver2"
- "bdver3"
- "bdver4"
- "bonnell"
- "broadwell"
- "btver1"
- "btver2"
- "c3"
- "c3-2"
- "cannonlake"
- "cascadelake"
- "cooperlake"
- "core-avx-i"
- "core-avx2"
- "core2"
- "corei7"
- "corei7-avx"
- "generic"
- "geode"
- "goldmont"
- "goldmont-plus"
- "haswell"
- "icelake-client"
- "icelake-server"
- "ivybridge"
- "k8"
- "k8-sse3"
- "knl"
- "knm"
- "lakemont"
- "nehalem"
- "nocona"
- "opteron"
- "opteron-sse3"
- "sandybridge"
- "silvermont"
- "skx"
- "skylake"
- "skylake-avx512"
- "slm"
- "tigerlake"
- "tremont"
- "westmere"
- "x86-64"
- "x86-64-v2"
- "x86-64-v3"
- "x86-64-v4"
- "znver1"
- "znver2"
- "znver3")
- '())))))
+ ("x86_64"
+ ;; This list was obtained from clang/test/Misc/target-invalid-cpu-note.c
+ ,@(cond
+ ((version>=? version "17.0")
+ '("nocona" "core2" "penryn" "bonnell" "atom" "silvermont" "slm"
+ "goldmont" "goldmont-plus" "tremont" "nehalem" "corei7" "westmere"
+ "sandybridge" "corei7-avx" "ivybridge" "core-avx-i" "haswell"
+ "core-avx2" "broadwell" "skylake" "skylake-avx512" "skx"
+ "cascadelake" "cooperlake" "cannonlake" "icelake-client"
+ "rocketlake" "icelake-server" "tigerlake" "sapphirerapids"
+ "alderlake" "raptorlake" "meteorlake" "sierraforest" "grandridge"
+ "graniterapids" "graniterapids-d" "emeraldrapids" "knl" "knm" "k8"
+ "athlon64" "athlon-fx" "opteron" "k8-sse3" "athlon64-sse3"
+ "opteron-sse3" "amdfam10" "barcelona" "btver1" "btver2" "bdver1"
+ "bdver2" "bdver3" "bdver4" "znver1" "znver2" "znver3" "znver4"
+ "x86-64" "x86-64-v2" "x86-64-v3" "x86-64-v4"))
+ ((version>=? version "16.0")
+ '("nocona" "core2" "penryn" "bonnell" "atom" "silvermont" "slm"
+ "goldmont" "goldmont-plus" "tremont" "nehalem" "corei7" "westmere"
+ "sandybridge" "corei7-avx" "ivybridge" "core-avx-i" "haswell"
+ "core-avx2" "broadwell" "skylake" "skylake-avx512" "skx"
+ "cascadelake" "cooperlake" "cannonlake" "icelake-client"
+ "rocketlake" "icelake-server" "tigerlake" "sapphirerapids"
+ "alderlake" "raptorlake" "meteorlake" "sierraforest" "grandridge"
+ "graniterapids" "emeraldrapids" "knl" "knm" "k8" "athlon64"
+ "athlon-fx" "opteron" "k8-sse3" "athlon64-sse3" "opteron-sse3"
+ "amdfam10" "barcelona" "btver1" "btver2" "bdver1" "bdver2"
+ "bdver3" "bdver4" "znver1" "znver2" "znver3" "znver4" "x86-64"
+ "x86-64-v2" "x86-64-v3" "x86-64-v4"))
+ ((version>=? version "15.0")
+ '("nocona" "core2" "penryn" "bonnell" "atom" "silvermont" "slm"
+ "goldmont" "goldmont-plus" "tremont" "nehalem" "corei7" "westmere"
+ "sandybridge" "corei7-avx" "ivybridge" "core-avx-i" "haswell"
+ "core-avx2" "broadwell" "skylake" "skylake-avx512" "skx"
+ "cascadelake" "cooperlake" "cannonlake" "icelake-client"
+ "rocketlake" "icelake-server" "tigerlake" "sapphirerapids"
+ "alderlake" "knl" "knm" "k8" "athlon64" "athlon-fx" "opteron"
+ "k8-sse3" "athlon64-sse3" "opteron-sse3" "amdfam10" "barcelona"
+ "btver1" "btver2" "bdver1" "bdver2" "bdver3" "bdver4" "znver1"
+ "znver2" "znver3" "x86-64" "x86-64-v2" "x86-64-v3" "x86-64-v4"))
+ ((version>=? version "13.0")
+ '("nocona" "core2" "penryn" "bonnell" "atom" "silvermont" "slm"
+ "goldmont" "goldmont-plus" "tremont" "nehalem" "corei7" "westmere"
+ "sandybridge" "corei7-avx" "ivybridge" "core-avx-i" "haswell"
+ "core-avx2" "broadwell" "skylake" "skylake-avx512" "skx"
+ "cascadelake" "cooperlake" "cannonlake" "icelake-client"
+ "rocketlake" "icelake-server" "tigerlake" "sapphirerapids"
+ "alderlake" "knl" "knm" "k8" "athlon64" "athlon-fx" "opteron"
+ "k8-sse3" "athlon64-sse3" "opteron-sse3" "amdfam10" "barcelona"
+ "btver1" "btver2" "bdver1" "bdver2" "bdver3" "bdver4" "znver1"
+ "znver2" "znver3" "x86-64" "x86-64-v2" "x86-64-v3" "x86-64-v4"))
+ ((version>=? version "9.0")
+ '("atom" "silvermont" "slm" "goldmont" "goldmont-plus" "tremont"
+ "nehalem" "corei7" "westmere" "sandybridge" "corei7-avx"
+ "ivybridge" "core-avx-i" "haswell" "core-avx2" "broadwell"
+ "skylake" "skylake-avx512" "skx" "cascadelake" "cooperlake"
+ "cannonlake" "icelake-client" "icelake-server" "knl" "knm" "k8"
+ "athlon64" "athlon-fx" "opteron" "k8-sse3" "athlon64-sse3"
+ "opteron-sse3" "amdfam10" "barcelona" "btver1" "btver2" "bdver1"
+ "bdver2" "bdver3" "bdver4" "znver1" "znver2" "x86-64"))
+ (else '()))))))
(define-public (make-clang-toolchain clang libomp)
(package
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
E
E
Efraim Flashner wrote on 6 Mar 12:06 +0100
[PATCH 11/11] gnu: clang-properties: Add micro-architecture support for powerpc64le.
(address . 69581@debbugs.gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
5481aa7253a1c21a53a1376a96887f3be2af8243.1709722620.git.efraim@flashner.co.il
* gnu/packages/llvm.scm (clang-properties): Add entry for powerpc64le.

Change-Id: I89f300922270a1f35aa08e73e62d90843bd902c8
---
gnu/packages/llvm.scm | 5 +++++
1 file changed, 5 insertions(+)

Toggle diff (20 lines)
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 2567405cb4..c002f62cac 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -482,6 +482,11 @@ (define* (clang-from-llvm llvm clang-runtime
(define (clang-properties version)
"Return package properties for Clang VERSION."
`((compiler-cpu-architectures
+ ("powerpc64le"
+ ;; This list was obtained from clang/test/Misc/target-invalid-cpu-note.c
+ ;; and then trimmed down.
+ ,@(if (version>=? version "11.0")
+ '("power8" "power9" "power10" "powerpc64le")))
("x86_64"
;; This list was obtained from clang/test/Misc/target-invalid-cpu-note.c
,@(cond
--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
L
L
Ludovic Courtès wrote on 6 Mar 18:49 +0100
Re: [bug#69581] [PATCH 01/11] gnu: opus: Mark as tunable.
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 69581@debbugs.gnu.org)
8734t3b67t.fsf@gnu.org
Hello!

Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (4 lines)
> * gnu/packages/xiph.scm (opus)[properties]: Mark package as tunable.
>
> Change-Id: I5df964b5692c6f390eef55d780810b03d6a895dc

[...]

Toggle quote (2 lines)
> + (properties `((tunable? . #t)))

It would be great if there could be a one-line comment above stating why
this makes sense, as is done for ‘eigen-benchmarks’ and ‘b2sum’, for
example.

Ludo’.
L
L
Ludovic Courtès wrote on 6 Mar 18:53 +0100
Re: [bug#69581] [PATCH 03/11] guix: cpu: Be consistent with x86_64 micro-architecture names.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87y1av9rhn.fsf@gnu.org
Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (9 lines)
> * gnu/packages/golang.scm (%go-1.18-x86_64-micro-architectures): Rename
> micro-architectures from x86_64-v* to x86-64-v*.
> * guix/cpu.scm (cpu->gcc-architecture): Return x86-64 as the fallback.
> (cpu->micro-architecture-level): Rename micro-architectures from
> x86_64-v* to x86-64-v*.
> (gcc-architecture->micro-architecture-level): Same.
>
> Change-Id: I37db65970417c22699ae8097b0361bccf76c1267

LGTM.

Do I get it right that with the previous names, those procedures were
incorrect, because the underscore names are not recognized by GCC?

BTW, you can drop “guix:” from the first line of the commit log.

Ludo’.
L
L
Ludovic Courtès wrote on 6 Mar 18:59 +0100
Re: [bug#69581] [PATCH 04/11] guix: cpu: Rename x86-64-v1 to x86-64.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87sf139r76.fsf@gnu.org
Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (8 lines)
> This is the actual micro-architecture designation used by compilers.
>
> * gnu/packages/gcc.scm (%gcc-11-x86_64-micro-architectures): Rename
> x86-64-v1 to x86-64.
> * gnu/packages/golang.scm (%go-1.18-x86_64-micro-architectures): Same.
> * guix/cpu.scm (cpu->micro-architecture-level): Same.
> (gcc-architecture->micro-architecture-level): Same.

LGTM!
L
L
Ludovic Courtès wrote on 6 Mar 19:05 +0100
Re: [bug#69581] [PATCH 05/11] guix: cpu: Enable tuning for i686-linux.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87o7br9qy8.fsf@gnu.org
Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (6 lines)
> * gnu/packages/gcc.scm (gcc-7, gcc-10, gcc-11, gcc-12, gcc-13)
> [properties]: In compiler-cpu-architectures use the
> x86_64-micro-architectures list for i686.
> * guix/cpu.scm (cpu->gcc-architecture): Expand the x86_64 case to also
> support i686.

[...]

Toggle quote (8 lines)
> +++ b/gnu/packages/gcc.scm
> @@ -673,6 +673,7 @@ (define-public gcc-7
> `((compiler-cpu-architectures
> ("aarch64" ,@%gcc-7.5-aarch64-micro-architectures)
> ("armhf" ,@%gcc-7.5-armhf-micro-architectures)
> + ("i686" ,@%gcc-7.5-x86_64-micro-architectures)
> ("x86_64" ,@%gcc-7.5-x86_64-micro-architectures))

Wait, that wouldn’t work on an actual i686 CPU, right?

I was surprised to see that GCC built for i686 accepts those flags:

guix shell -s i686-linux gcc-toolchain -- gcc -march=skylake /tmp/t.c
guix shell -s i686-linux gcc-toolchain -- gcc -march=x86-64-v4 /tmp/t.c

If GCC agrees, so be it. LGTM!
L
L
Ludovic Courtès wrote on 6 Mar 19:06 +0100
Re: [bug#69581] [PATCH 06/11] gnu: syncthing: Mark as tunable.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87jzmf9qwj.fsf@gnu.org
Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (3 lines)
> * gnu/packages/syncthing.scm (syncthing)[properties]: Mark package as
> tunable.

[...]

Toggle quote (2 lines)
> + (tunable? . #t)))

I’m skeptical; why would a backup program benefit from vector ISA
extensions?

Ludo’.
L
L
Ludovic Courtès wrote on 6 Mar 19:09 +0100
Re: [bug#69581] [PATCH 07/11] gnu: rust: Add tuning information.
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 69581@debbugs.gnu.org)
87edcn9qqr.fsf@gnu.org
Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (5 lines)
> * gnu/packages/rust.scm (rust)[properties]: Add clang-properties
> matching the input llvm package.
>
> Change-Id: Ie2ef2387fff8aa639dcd73752bcaf3c26bbb376d

Hmm rustc actually uses LLVM for code generation? I’m a bit lost.
Anyway, if it supports those same flags as Clang, all good; maybe add a
comment to say so explicitly.

Toggle quote (4 lines)
> + (properties `(`(append
> + ,(alist-delete 'hidden? (package-properties base-rust))
> + ,@(clang-properties "15"))))

I think you meant:

(properties (append (alist-delete 'hidden? (package-properties base-rust))
(clang-properties "15")))

Ludo’.
L
L
Ludovic Courtès wrote on 6 Mar 19:10 +0100
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 69581@debbugs.gnu.org)
87a5nb9qoh.fsf@gnu.org
Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (4 lines)
> + (properties `(`(append
> + ,(alist-delete 'hidden? (package-properties base-rust))
> + ,@(clang-properties "15"))))

Just realized that we cannot really call ‘clang-properties’ from here
because ‘properties’ is not a thunked field, so this would lead to a
top-level circular dependency… You might need to duplicate the info.

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 6 Mar 19:11 +0100
Re: [bug#69581] [PATCH 08/11] transformations: Add support for rust.
(name . Efraim Flashner)(address . efraim@flashner.co.il)
875xxz9qnz.fsf@gnu.org
Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (4 lines)
> * guix/transformations.scm (tuning-compiler): Add support for rustc.
>
> Change-Id: I6db596a586eda648666550cdcadaa5e1704cb79c

LGTM!
L
L
Ludovic Courtès wrote on 6 Mar 19:12 +0100
Re: [bug#69581] [PATCH 10/11] gnu: clang-properties: Update x86_64 micro-architectures.
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 69581@debbugs.gnu.org)
871q8n9qly.fsf@gnu.org
Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (5 lines)
> * gnu/packages/llvm.scm (clang-properties): Add entries on x86_64 for
> versions 17, 16, 15, 13, 9 and remove entry for version 10.
>
> Change-Id: I93149c30f011c6de8ff0cc2c2b6f0186540359cd

[...]

Toggle quote (6 lines)
> - ;; This list was obtained by running:
> - ;;
> - ;; guix shell clang -- llc -march=x86-64 -mattr=help
> - ;;
> - ;; filtered from uninteresting entries such as "i686" and "pentium".

[...]

Toggle quote (3 lines)
> + ("x86_64"
> + ;; This list was obtained from clang/test/Misc/target-invalid-cpu-note.c

Does the ‘llc’ method no longer work? It looked easier.

Apart from that, LGTM.

Ludo’.
L
L
Ludovic Courtès wrote on 6 Mar 19:12 +0100
Re: [bug#69581] [PATCH 11/11] gnu: clang-properties: Add micro-architecture support for powerpc64le.
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 69581@debbugs.gnu.org)
87wmqf8c17.fsf@gnu.org
Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (4 lines)
> * gnu/packages/llvm.scm (clang-properties): Add entry for powerpc64le.
>
> Change-Id: I89f300922270a1f35aa08e73e62d90843bd902c8

LGTM, thanks!
E
E
Efraim Flashner wrote on 7 Mar 10:09 +0100
Re: [bug#69581] [PATCH 05/11] guix: cpu: Enable tuning for i686-linux.
(name . Ludovic Courtès)(address . ludo@gnu.org)
ZemEWCyrDrTFjEr4@3900XT
On Wed, Mar 06, 2024 at 07:05:03PM +0100, Ludovic Courtès wrote:
Toggle quote (27 lines)
> Efraim Flashner <efraim@flashner.co.il> skribis:
>
> > * gnu/packages/gcc.scm (gcc-7, gcc-10, gcc-11, gcc-12, gcc-13)
> > [properties]: In compiler-cpu-architectures use the
> > x86_64-micro-architectures list for i686.
> > * guix/cpu.scm (cpu->gcc-architecture): Expand the x86_64 case to also
> > support i686.
>
> [...]
>
> > +++ b/gnu/packages/gcc.scm
> > @@ -673,6 +673,7 @@ (define-public gcc-7
> > `((compiler-cpu-architectures
> > ("aarch64" ,@%gcc-7.5-aarch64-micro-architectures)
> > ("armhf" ,@%gcc-7.5-armhf-micro-architectures)
> > + ("i686" ,@%gcc-7.5-x86_64-micro-architectures)
> > ("x86_64" ,@%gcc-7.5-x86_64-micro-architectures))
>
> Wait, that wouldn’t work on an actual i686 CPU, right?
>
> I was surprised to see that GCC built for i686 accepts those flags:
>
> guix shell -s i686-linux gcc-toolchain -- gcc -march=skylake /tmp/t.c
> guix shell -s i686-linux gcc-toolchain -- gcc -march=x86-64-v4 /tmp/t.c
>
> If GCC agrees, so be it. LGTM!

I checked with `guix build foo --system=i686-linux --tune=znver2` and
everything just worked. That's definitely a Guix special, since we don't
have multilib support.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmXphFUACgkQQarn3Mo9
g1HzUg/+IDMZFrBLX/TJt3QuZO0CoUnKoLuGzeGc0r/T1bz67PJOORjYuLBV9oZT
o8V8IHXakrOfB4x6C81WSOuxSOAUk4CniEKC62uB76JcsZNQwXAQAn/fxfyvGnRo
PDFB1f5u6nb97SHGW+LdYv/Be7Rpy/KcdG+cB4o4ELBoJ9zc5ZvQ10DYq7Z3pmzL
1DpVOorQvYz4m02sTEBD6NHJ0wHOYU4RWdLY1RbhjFILtoDJrouw0d6s4o0rQIGo
edzTe23HH9ppDpXK+pZbY2W3vOuIpArpDi6BtW9ktdRnXTy/8vAjL7snph2X733i
mKcXxR0dtgGchh/aIbmhzv+ARx/nJhbtbn2KeHjFzPNK5IRyR5T6p6iXXc2kUxPo
Nss30+igG9QM5F1TT39GAe8bnSmRPrrrA6YQNy3RohUMeY1tT78L3JAUKvTqRXeN
Q5qCQoeGmQqqydMUxQjgtJgR3+vXzRol73g809hOp3ZYXwcrz3BP4cKO6vIAFPvj
vMbJUf8EG5fcRWJ5yGxOk6n4XMxxmzT9VqmC3UDlCibvEYP3UzesncG8frBIpcDV
nuYO8SFrkF6RZVTkTwX9t+6RrJ2iHN5YADkEJcgLDg+W57jFHIX0YYwqgTFL8SJg
sv1mpdUMWs0MutC0/LmwKOq4SA4DXBB3QPCeIDkjh0IibDw0DXs=
=JCDs
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 7 Mar 10:09 +0100
Re: [bug#69581] [PATCH 07/11] gnu: rust: Add tuning information.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 69581@debbugs.gnu.org)
ZemEZgC6Ao0vs0Ob@3900XT
On Wed, Mar 06, 2024 at 07:09:32PM +0100, Ludovic Courtès wrote:
Toggle quote (11 lines)
> Efraim Flashner <efraim@flashner.co.il> skribis:
>
> > * gnu/packages/rust.scm (rust)[properties]: Add clang-properties
> > matching the input llvm package.
> >
> > Change-Id: Ie2ef2387fff8aa639dcd73752bcaf3c26bbb376d
>
> Hmm rustc actually uses LLVM for code generation? I’m a bit lost.
> Anyway, if it supports those same flags as Clang, all good; maybe add a
> comment to say so explicitly.

It supports the same target_cpu targets as clang does. With llvm
switching to a monorepo they've apparently done a better job about
syncing the list between llvm and clang.

Toggle quote (9 lines)
> > + (properties `(`(append
> > + ,(alist-delete 'hidden? (package-properties base-rust))
> > + ,@(clang-properties "15"))))
>
> I think you meant:
>
> (properties (append (alist-delete 'hidden? (package-properties base-rust))
> (clang-properties "15")))

I would love to have it cleaner like this. There was a lot of trial and
error to end up with what I had above. I'll try that.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmXphGYACgkQQarn3Mo9
g1Fm2A/9Hr8L3lKFPyqMmEgQJwkM+L9VK2N8pKw6bfajrAgIeB+6aZJ799gPO+83
Ea/n/0UCAB8PmSXlMhvSQu5Prn9ffvr9qBp+eZCmC7xDf1oxFiUp5fws/OUgxrzV
kpdF+T+i5NcKA/W+u8tW8FxFxH2L2GEUkoTrWBdV7AEZV5qCCkaPqQMrR/8YhEBf
+TyCQi7JcO11H3q0AZ3VarnZKgC4Rv+FmuA4O6CocaH1g1+3F3IaaSlYgqr342I7
shY6BVvWswI8/9/sFVwZXWhnZG8m5BVYfsfJtkO+cDshommyNYMzh8KpdYNFlzso
r1HKvnzpxfJAC20gTdllDkyEeZ+9190PmijSevaJkgCjBC9iMpeNos6duvn5xFjd
cTFvl9DRVRNETK7udOhTbXIAPhJgEQ5Uc4r9ChbCneonEYmymcLsnkBHQ8C52elQ
jQRRUkzQI3pOiqNTRTFPZfgOD3IR3QILgi6vlz9IxDn0bdEBXJArKCAJ6vRr/PIb
U7rw+svfeXli0tvkvr2wHILi9622BpjpmNjrkSa56Yk2iRAeJOQfYU726QpXgPux
Pts64u7nu59QSxg2XFeapb0YeeHBAEgSq36M7adihd7bH2uXNVEZQeQrKk7UCHwP
nfrdR71bPHVvgf5a+H7/XZJrCNWoLe7i6UNNbfJcSscOLX9iOGY=
=0wvU
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 7 Mar 10:10 +0100
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 69581@debbugs.gnu.org)
ZemEbY7XUYjagmq6@3900XT
On Wed, Mar 06, 2024 at 07:10:54PM +0100, Ludovic Courtès wrote:
Toggle quote (10 lines)
> Efraim Flashner <efraim@flashner.co.il> skribis:
>
> > + (properties `(`(append
> > + ,(alist-delete 'hidden? (package-properties base-rust))
> > + ,@(clang-properties "15"))))
>
> Just realized that we cannot really call ‘clang-properties’ from here
> because ‘properties’ is not a thunked field, so this would lead to a
> top-level circular dependency… You might need to duplicate the info.

We also use the list for zig.

Considering we're only supporting one version for rust duplicating the
information wouldn't be the worst thing but it'd be better to only have
it declared in one spot.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmXphG0ACgkQQarn3Mo9
g1GzFg//avG4Ks35xDfZSry6hqHaaltrE8Eb9RQDqOskJZ7RcxzID6bkitvRtjmg
ZWAJR1xplDyhsVr3sd/D3L/R3JSc0IRajbjERi+PM7nPrndg2SZl3Ir8hTdJxHWl
r9n3QwKBV8p5n+Av9rokZGC1fxH2Dqo9x+zFRBmhFIEbUFIrgzSyqla0nT9/f8S4
K0Lk7VZpQWw15nyliVAt91ILfFXFhi7jP/Khuc99b0/kMpPvUA400lHT8pp5L1zJ
I2XDBD76SWL5MsrVYQWPrO5BAm20b7y4L5zK9pNQbSG9Y+/Bh5LzImi+loZgFKIM
GVI9RiLR9nR1GQscebU4FUpKPqfPVdlOIX7dh3G1FsBwavDyZlY7BIezAYAWJrQz
BkIzZOhKfoQJd6gjr/ca/vXUQI8lOe83M2i5Y3z/N6sMWtDgSI1w1FF8tNRubGNc
6atpgep+1Vn1q78jdFMd5+Yz5mXcDOpr6mWFdJGLLnDZhWNlv8AMVWS66dpnyGIS
LMKg2QwwSf+HqD3ij8b+B5TiDupQHdAfNGercktuG01U00P/5IiajQ4/L717Vdyl
UYDmMWXRgAJ3btOESUEhbp7B2R4dMluMLwns9jV1JQkvB7pKWbSQRwNErP0oRsU0
lx+KuqEbikN5ScgCvdtA3GT43qlbgOoOgJzwwUxO3Obl3c8Vh58=
=OxB8
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 7 Mar 10:09 +0100
Re: [bug#69581] [PATCH 06/11] gnu: syncthing: Mark as tunable.
(name . Ludovic Courtès)(address . ludo@gnu.org)
ZemEXi8DhxZyyWPc@3900XT
On Wed, Mar 06, 2024 at 07:06:04PM +0100, Ludovic Courtès wrote:
Toggle quote (12 lines)
> Efraim Flashner <efraim@flashner.co.il> skribis:
>
> > * gnu/packages/syncthing.scm (syncthing)[properties]: Mark package as
> > tunable.
>
> [...]
>
> > + (tunable? . #t)))
>
> I’m skeptical; why would a backup program benefit from vector ISA
> extensions?

There's a fair amount of hashing and other bits that happen in
syncthing, not just sending files over the network. IIRC when the GOAMD
support was added hashing was specifically shown to have a massive boost
from targeting newer micro-architectures.

Also this is the package I always end up enabling tuning on when
experimenting with tuning and go.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmXphF4ACgkQQarn3Mo9
g1G/ohAAjztQ+C9d2ifabDsOmzR8g4pGY7k8SyJsFcW3fIE+JUnnSmeImKkXEn2V
YAWOO591O+KqseaCD4uHN412atCPNgdSPxbjAVz1XE9bK9YLoV7hQ0nG6OqM4e0k
PZGn3HfY48iij7M72i/bmXTPCRrlYafB4kgs5DVYoPBNUG+ac26cXpxsfjGlNs8B
T7k5gvs9GR2kxUoosm+rrSFmNIIY9yeSPESw96nzNp0TIfPRCPpeaO/UHh6OssBp
NHUDx+Q966pELYmDQ+7Oi+vUrNGpDZrRkA4v9tTpwqit8zYBTXE0P7grKKPdvfH2
bd25fclXoM2Sj5B7WyMjJg7nrnEAByCu1Sy6xU2YpQ8+PVNlp2DkfRKmw7VRKUCd
VCQ6PX4N1QEmeHKc1P0KUj0qovo05/b5X6UTHtI867PZDxbFQXoNZkvQv7a5KSmo
53QeOEruzp2TYvCslOU1yYbkyMpQ08c59ceyDQyfxLwhVc7svDTymDzhPJn2gyUA
bC9h+qii6cNNfP6ClEeBYDl2lZiIBmWSHOCn3Y7RNOWZeDsGmwSz2UD2+br9vjN2
rcQ7pZ32DcDHHNGkjKNDTHpBavYc7IIYCwIjHulQbFjnLjrebDZfchuBNa4GiW1X
yCrmZgOA2Tr+VcFPmvoCIhEeRUyyBb97ivUwG2iGdBfhYwhLD68=
=LBzC
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 7 Mar 10:10 +0100
Re: [bug#69581] [PATCH 10/11] gnu: clang-properties: Update x86_64 micro-architectures.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 69581@debbugs.gnu.org)
ZemEdLZjXn5FDmf6@3900XT
On Wed, Mar 06, 2024 at 07:12:25PM +0100, Ludovic Courtès wrote:
Toggle quote (24 lines)
> Efraim Flashner <efraim@flashner.co.il> skribis:
>
> > * gnu/packages/llvm.scm (clang-properties): Add entries on x86_64 for
> > versions 17, 16, 15, 13, 9 and remove entry for version 10.
> >
> > Change-Id: I93149c30f011c6de8ff0cc2c2b6f0186540359cd
>
> [...]
>
> > - ;; This list was obtained by running:
> > - ;;
> > - ;; guix shell clang -- llc -march=x86-64 -mattr=help
> > - ;;
> > - ;; filtered from uninteresting entries such as "i686" and "pentium".
>
> [...]
>
> > + ("x86_64"
> > + ;; This list was obtained from clang/test/Misc/target-invalid-cpu-note.c
>
> Does the ‘llc’ method no longer work? It looked easier.
>
> Apart from that, LGTM.

I've attached the file from llvmorg-15.0.7. I found the file easier
since I didn't have to run the command from the shell and it listed all
the architectures I wouldn't have even thought of looking at. And I
didn't have to do any filtering myself. And it's sorted by "power" and
by vendor, not alphabetically.


--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmXphHQACgkQQarn3Mo9
g1H57BAAq2QWBomOC80RxB+cGxVhAWeBhusoqQCHBoj/okygUWKiXMjjHr/d2s/f
uwjoGpCKeJ8wkNfgtCbkcjnlm1olpXKpQGA9BXmSaWnsbFqZFw+8wv7cySfwZ375
txLJ8iKDEPhg55G2PjlVjrjJHBPaGPl1NLoPjMFU7SJxwY5LH7I07NhH9ij9et2e
ivfvvPL+AxlMC2VjdBRiR2eL4CFkXXmkWDTWgLI2KcmVj14ZfWcY4S5QuMt1F1vT
CjDn2qRMIXBc+vA4UOIOs0hfP+iLHGMS0PEDCoNDp2I5SbDEymG4eFwQ8r7r87UY
4wEYBRjZjGU4o4kcSbja3oWOeSkeTgZ1FCMgR/p4dQs2VNkv3Vxd4x6XAaKo3kTi
/5f8AxIq5bPmcznNR0CH94dHAaE7/1qjRDX6KxeE8r7PfhyTzECMSsPgGp53JtrT
HDKXgl8kDb9xBA1gmc5Y5WG9eThFkXmtWT8pp+KVzKkcXgg7pwvx4BccWxrJd9aR
VgCWx2mKXVHx5TT4d0Suo6j3QPFaClMJN8Isf8x6jaWojWECL6uyUductJUwzBrt
q3CP9Qa2fNYZGW0XZGDSSA8C7Jh+31JFdnrhFKHAipUTFKC719PN8RNraLbCw4SV
X0+M0m416jn+6hGI7I95TVNbpv0fkdPq5286ib9UpuNEkGpGRDY=
=Gn3y
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 7 Mar 10:11 +0100
Re: [bug#69581] [PATCH 03/11] guix: cpu: Be consistent with x86_64 micro-architecture names.
(name . Ludovic Courtès)(address . ludo@gnu.org)
ZemE1QL-3JlGsTJr@3900XT
On Wed, Mar 06, 2024 at 06:53:24PM +0100, Ludovic Courtès wrote:
Toggle quote (18 lines)
> Efraim Flashner <efraim@flashner.co.il> skribis:
>
> > * gnu/packages/golang.scm (%go-1.18-x86_64-micro-architectures): Rename
> > micro-architectures from x86_64-v* to x86-64-v*.
> > * guix/cpu.scm (cpu->gcc-architecture): Return x86-64 as the fallback.
> > (cpu->micro-architecture-level): Rename micro-architectures from
> > x86_64-v* to x86-64-v*.
> > (gcc-architecture->micro-architecture-level): Same.
> >
> > Change-Id: I37db65970417c22699ae8097b0361bccf76c1267
>
> LGTM.
>
> Do I get it right that with the previous names, those procedures were
> incorrect, because the underscore names are not recognized by GCC?
>
> BTW, you can drop “guix:” from the first line of the commit log.

All our compilers expect a dash instead of an underscore, except for go
which doesn't care since we only need the v[234].

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmXphNUACgkQQarn3Mo9
g1HpVw/+MhTTMV0rQKNkh4+Shdi7oiOWA73Gf1RWi9hvANAknID1C5p6V5eWmQFK
AIkT+uAELF+O/jgK/nW9Y5XjeHH4K1NxtuuXCoraDs5EpXiTTC17AJkjeikh1OTo
ZBvkMcTqFZNsgOYhXldzgpwcwEfBzx20wYArcM1B0zCa87qN3F1/0JRu2Rfz3U35
VyiUhknk7mNriUi6oyjGsRB8ZDWT23X841S8W/j09FID/ztMgJXoAdTG+5myMzCF
/aDoWfTb1Pjqj87Y1XTiNQO/advMazGtN1sTe3i8CdCuiKLgqdJLOmIuDvdS2n9g
kv8bEMv7d0md7jTIKUrY2EHx7yt/cyQwzlBM+BvWPJcaqppSZ6wgVbFhEJtxmh0r
/WHJXvL2MOD3QCA2tKFjOdWZGZg9lGbRiTBGu+PwuRCeSV6IdnGx3XUbW3I58Kiu
Fv8v4m6kjrP9jrGBprWWK4MN7yQmmaw7plY9w5UBzYuLytz1S4+IwKpynwxWcfXp
GpyuQDEdPZHC2Es8yX/ano2RNdFlFcTaOuiN8MdaB0GbtMFoV8KO5zVvHkxb1JgF
9F2q793wWebxHvskLzwtE8VtA13moWcoci5c+XSWflVL9EneL7YQNxrt26JcDZJH
gMISd68aaDwhmoPAH7iQZer+yWDIp2YkvdjEbZ/TL9rCxJJ+gNI=
=7Abu
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 7 Mar 10:12 +0100
Re: [bug#69581] [PATCH 10/11] gnu: clang-properties: Update x86_64 micro-architectures.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 69581@debbugs.gnu.org)
ZemFFkXw6dciUZhM@3900XT
On Wed, Mar 06, 2024 at 07:12:25PM +0100, Ludovic Courtès wrote:
Toggle quote (24 lines)
> Efraim Flashner <efraim@flashner.co.il> skribis:
>
> > * gnu/packages/llvm.scm (clang-properties): Add entries on x86_64 for
> > versions 17, 16, 15, 13, 9 and remove entry for version 10.
> >
> > Change-Id: I93149c30f011c6de8ff0cc2c2b6f0186540359cd
>
> [...]
>
> > - ;; This list was obtained by running:
> > - ;;
> > - ;; guix shell clang -- llc -march=x86-64 -mattr=help
> > - ;;
> > - ;; filtered from uninteresting entries such as "i686" and "pentium".
>
> [...]
>
> > + ("x86_64"
> > + ;; This list was obtained from clang/test/Misc/target-invalid-cpu-note.c
>
> Does the ‘llc’ method no longer work? It looked easier.
>
> Apart from that, LGTM.

Forgot to attach the file.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmXphRYACgkQQarn3Mo9
g1GLDxAAgg/H2aFBucgh4EqfEFldcK1rTioWgfOnX5yYD4FCIfWcSGiDDYjBXGAp
b1e9JIb0IfaMRejhqBIKOGxMAtHhPHlqnXwS6BqnXBWBOvw8suC7kS5q4MIqXGQ8
MEC2GJR5UOpqBM+7H8jfzPGaQ+yroOXNBfRUFuwuvIJpUQidOze7RWGKRpPBC1zm
6xDtQ0W6xkSUcFudW/AiPSOvfPfBItY3qXd8gxSI9SmZ4VnfskI6Dw6lkJE7GOmz
Wgo8nVM5JzhxpQAsQyXFbhMRtPbkqdg7M+Uo5UCe4CbQqCSd/8Tcmy7AlW6ZVBHB
Crfp1RUiysVfNpaaaRBYZsDvNzmI6caCxjcJvSQ2Hy7OSvJMC5WMco50nBz/s7/H
8FH2V1Q4O4Awkus8rzWkUPudjhOk8x3joGY/98K3B/bC+LeDrB16q628njueS++3
wI8MZxCuZwJF9Eoql9Au4SHNDQVrtzkrLAVbp6Mhpvzw1FbtAhLKP18+at2JMDaw
yCmfQ4YiigzTNRhZZ1AEq7YpHNTYLHi9UEuM4LNJ0DVLdl0cwr3IscfFtlMUmPzY
HVftMXZuY650DHlnvQ03ltZPHXPC0nfX2mq/rvgNIWAqTOq94rDPkFC538mBqs8i
U8IPXzX7mK96VpWupdcfqTwhmMKcOndLgrjni8333RUAXWq5Tro=
=akYi
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 7 Mar 22:38 +0100
Re: [bug#69581] [PATCH 07/11] gnu: rust: Add tuning information.
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 69581@debbugs.gnu.org)
87o7bp67up.fsf@gnu.org
Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (17 lines)
> On Wed, Mar 06, 2024 at 07:10:54PM +0100, Ludovic Courtès wrote:
>> Efraim Flashner <efraim@flashner.co.il> skribis:
>>
>> > + (properties `(`(append
>> > + ,(alist-delete 'hidden? (package-properties base-rust))
>> > + ,@(clang-properties "15"))))
>>
>> Just realized that we cannot really call ‘clang-properties’ from here
>> because ‘properties’ is not a thunked field, so this would lead to a
>> top-level circular dependency… You might need to duplicate the info.
>
> We also use the list for zig.
>
> Considering we're only supporting one version for rust duplicating the
> information wouldn't be the worst thing but it'd be better to only have
> it declared in one spot.

Then it should be declared in a module that’s not in a cycle with its
users (that’s annoying!). Maybe a separate ‘llvm-meta.scm’?

Ludo’.
L
L
Ludovic Courtès wrote on 7 Mar 22:42 +0100
Re: [bug#69581] [PATCH 10/11] gnu: clang-properties: Update x86_64 micro-architectures.
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 69581@debbugs.gnu.org)
87il1x67ny.fsf@gnu.org
Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (31 lines)
> On Wed, Mar 06, 2024 at 07:12:25PM +0100, Ludovic Courtès wrote:
>> Efraim Flashner <efraim@flashner.co.il> skribis:
>>
>> > * gnu/packages/llvm.scm (clang-properties): Add entries on x86_64 for
>> > versions 17, 16, 15, 13, 9 and remove entry for version 10.
>> >
>> > Change-Id: I93149c30f011c6de8ff0cc2c2b6f0186540359cd
>>
>> [...]
>>
>> > - ;; This list was obtained by running:
>> > - ;;
>> > - ;; guix shell clang -- llc -march=x86-64 -mattr=help
>> > - ;;
>> > - ;; filtered from uninteresting entries such as "i686" and "pentium".
>>
>> [...]
>>
>> > + ("x86_64"
>> > + ;; This list was obtained from clang/test/Misc/target-invalid-cpu-note.c
>>
>> Does the ‘llc’ method no longer work? It looked easier.
>>
>> Apart from that, LGTM.
>
> I've attached the file from llvmorg-15.0.7. I found the file easier
> since I didn't have to run the command from the shell and it listed all
> the architectures I wouldn't have even thought of looking at. And I
> didn't have to do any filtering myself. And it's sorted by "power" and
> by vendor, not alphabetically.

I see. It looks convenient but that’s a unit test: it’s not the “ground
truth” and it doesn’t have to match exactly what’s supported. The ‘llc’
command is likely more faithful so I would keep it at least in the
comment.

Ludo’.
E
E
Efraim Flashner wrote on 8 Mar 13:05 +0100
Re: [bug#69581] [PATCH 07/11] gnu: rust: Add tuning information.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 69581@debbugs.gnu.org)
Zer_IsCoOrBYZMKO@3900XT
On Thu, Mar 07, 2024 at 10:38:06PM +0100, Ludovic Courtès wrote:
Toggle quote (22 lines)
> Efraim Flashner <efraim@flashner.co.il> skribis:
>
> > On Wed, Mar 06, 2024 at 07:10:54PM +0100, Ludovic Courtès wrote:
> >> Efraim Flashner <efraim@flashner.co.il> skribis:
> >>
> >> > + (properties `(`(append
> >> > + ,(alist-delete 'hidden? (package-properties base-rust))
> >> > + ,@(clang-properties "15"))))
> >>
> >> Just realized that we cannot really call ‘clang-properties’ from here
> >> because ‘properties’ is not a thunked field, so this would lead to a
> >> top-level circular dependency… You might need to duplicate the info.
> >
> > We also use the list for zig.
> >
> > Considering we're only supporting one version for rust duplicating the
> > information wouldn't be the worst thing but it'd be better to only have
> > it declared in one spot.
>
> Then it should be declared in a module that’s not in a cycle with its
> users (that’s annoying!). Maybe a separate ‘llvm-meta.scm’?

How about moving it into (guix cpu) together with the ones from gcc?
There are apparently some CPUs that are identical but have different
names that we could map together and would allow us to make any changes
to them in one place. We've already pretty much done that with the
search paths.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmXq/yIACgkQQarn3Mo9
g1FqFxAAt08QhMClvFSPh/4MI1C2mKIkE7XLF08oHHXM6aVnB3k9mhwfFnzbUPHy
8gY1nQzIOzdWaa3UDcdMr5meA79bu/MH7U3TMFvorjP30Hk+6dOEjeOLrHet4/1l
+vcYqolYJdV2bdDeQQIxbeteNdnQ2daB8s1AefkM+ByvW0gciZIT1eLPJWLHWMY8
nxW0r3KPnyzQTRrzkwveAoLFZq1WQ2PgEz9lWRFLPxHAEP+AB4MVJQ/b7yciv5jR
7fu6+HjbXkoaIhNaAW6uSD9atABU9LpRr6xqm5EnEg2zYVSkvuBBOkvA/u1VzdHy
0HbdkPoFUUm3G1VSovlCV7ELUyDVe+TC/0Ocr5QE5dY6n0ENtNTYg321P7uqqVcY
YVxg59t5JY99G+dU5HBrHqLGCIG8T9iQ45vXMvT0fu9SXO5wsE8/udvlLx5/0xBg
fM8EAJDNx9GCxxvzyZtcCtTdPgQWtrlk+TaenI/e5KRoUJIPIY7QSUK4mkE8XPg2
J6QAAApNdjkLnTKIDy9zTl0TW2BGoXcT+ZeOWSTz5OM8CoMdl3XVkXStkG7dz7Ah
tp5FZ0M4MIaY5SGb7ggcrxELeNQ7CGApd+Xvs9XXGmVap2pU/qP1H+RC+ZzRuRsF
yVxv6R5G/UI/yUr6V0vEp9zotOZp5mbJjat/xrEm4ZqPgmlm9jc=
=50k/
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 8 Mar 13:07 +0100
Re: [bug#69581] [PATCH 10/11] gnu: clang-properties: Update x86_64 micro-architectures.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 69581@debbugs.gnu.org)
Zer_cDBZaIaiDIbH@3900XT
On Thu, Mar 07, 2024 at 10:42:09PM +0100, Ludovic Courtès wrote:
Toggle quote (38 lines)
> Efraim Flashner <efraim@flashner.co.il> skribis:
>
> > On Wed, Mar 06, 2024 at 07:12:25PM +0100, Ludovic Courtès wrote:
> >> Efraim Flashner <efraim@flashner.co.il> skribis:
> >>
> >> > * gnu/packages/llvm.scm (clang-properties): Add entries on x86_64 for
> >> > versions 17, 16, 15, 13, 9 and remove entry for version 10.
> >> >
> >> > Change-Id: I93149c30f011c6de8ff0cc2c2b6f0186540359cd
> >>
> >> [...]
> >>
> >> > - ;; This list was obtained by running:
> >> > - ;;
> >> > - ;; guix shell clang -- llc -march=x86-64 -mattr=help
> >> > - ;;
> >> > - ;; filtered from uninteresting entries such as "i686" and "pentium".
> >>
> >> [...]
> >>
> >> > + ("x86_64"
> >> > + ;; This list was obtained from clang/test/Misc/target-invalid-cpu-note.c
> >>
> >> Does the ‘llc’ method no longer work? It looked easier.
> >>
> >> Apart from that, LGTM.
> >
> > I've attached the file from llvmorg-15.0.7. I found the file easier
> > since I didn't have to run the command from the shell and it listed all
> > the architectures I wouldn't have even thought of looking at. And I
> > didn't have to do any filtering myself. And it's sorted by "power" and
> > by vendor, not alphabetically.
>
> I see. It looks convenient but that’s a unit test: it’s not the “ground
> truth” and it doesn’t have to match exactly what’s supported. The ‘llc’
> command is likely more faithful so I would keep it at least in the
> comment.

I'll keep the original comment and compare what I've added to what's
returned from the command. Then we also have an easy list to compare
against when removing uninteresting options from the output.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmXq/3AACgkQQarn3Mo9
g1Emlw/+IXDp48pbXVwjHPALj09uCebtzahOXrciFxz0RumHsnmcncbwshlilduR
DDwlbz9XYvC8jM7/SkFF/4Q8HdO4RArEImKvB8OPgkCQdINzcxfsbvrOBePuD2q9
Kzns8IJ7jLXXyw6eHgKQsge4BXDn7lyxkP5KssWRzeesDdlbg1+NvEEuOFGQ0cGi
EFjGDFno9G+ZlMcaf0LoifItCmeHbe3LLibcIa/6CzQTlAApx0mPE4reY5LYLrLB
Nx+H+xigsrUQkZMqfLaAnL/2okiPvj1IKgaTiOEFUtoANUHS/m6nmouUdC7R+we9
rXOmMXWfvA0HctkBGlU7rABhlA9gBwsGWQh4IerV74eLv9xmUGaeGUsZmIchfBMt
5kmQmGyUlW12CRYl3Qt1NGBKL/eN13HZP8/9VGBz547IotTWjOvgWaohnbQup29+
bglV4bjFnEVYgQDDKpZ4uU94vOe5Vsd0FuZaLBDS16/ZYAQrMRfzsdOgqY4D6RUJ
q68iFT+w9ssWlMxUJsHPws8IgxtRE4X7cIk2PKpCdFjd6o+45w9p9fN/P4PccW4t
omatgyPsLjG5eYkkIRRYBz4OZ2flQ2tASBqSgD6fetd/qbQKYxA6c6GNTPM8kHvs
PZy6yKTNe/qOZRbxu7u2sJBtsHG3ATs9L/bh1Y2FHBBJQpyLV3g=
=xHvj
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 8 Mar 22:57 +0100
Re: [bug#69581] [PATCH 07/11] gnu: rust: Add tuning information.
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 69581@debbugs.gnu.org)
87y1as2xqo.fsf@gnu.org
Hi,

Efraim Flashner <efraim@flashner.co.il> skribis:

Toggle quote (2 lines)
> On Thu, Mar 07, 2024 at 10:38:06PM +0100, Ludovic Courtès wrote:

[...]

Toggle quote (9 lines)
>> Then it should be declared in a module that’s not in a cycle with its
>> users (that’s annoying!). Maybe a separate ‘llvm-meta.scm’?
>
> How about moving it into (guix cpu) together with the ones from gcc?
> There are apparently some CPUs that are identical but have different
> names that we could map together and would allow us to make any changes
> to them in one place. We've already pretty much done that with the
> search paths.

To me, the whole point of the ‘compiler-cpu-architectures’ property is
that this info can be stored in the compiler package itself rather than
in some remote unrelated place (the same goes for search paths). My
instinct would be to preserve that, hence the suggestion of a new (gnu
packages llvm-meta) or (… llvm-infra) module, something like that.

We should also keep in mind that those CPU names are those defined by
compilers themselves; they don’t have to match the vendor-chosen name or
the name chosen by some other compiler.

WDYT? Does that make sense?

Ludo’.
E
E
Efraim Flashner wrote on 10 Mar 09:26 +0100
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 69581@debbugs.gnu.org)
Ze1utzZjl-83qp22@3900XT
On Fri, Mar 08, 2024 at 10:57:03PM +0100, Ludovic Courtès wrote:
Toggle quote (29 lines)
> Hi,
>
> Efraim Flashner <efraim@flashner.co.il> skribis:
>
> > On Thu, Mar 07, 2024 at 10:38:06PM +0100, Ludovic Courtès wrote:
>
> [...]
>
> >> Then it should be declared in a module that’s not in a cycle with its
> >> users (that’s annoying!). Maybe a separate ‘llvm-meta.scm’?
> >
> > How about moving it into (guix cpu) together with the ones from gcc?
> > There are apparently some CPUs that are identical but have different
> > names that we could map together and would allow us to make any changes
> > to them in one place. We've already pretty much done that with the
> > search paths.
>
> To me, the whole point of the ‘compiler-cpu-architectures’ property is
> that this info can be stored in the compiler package itself rather than
> in some remote unrelated place (the same goes for search paths). My
> instinct would be to preserve that, hence the suggestion of a new (gnu
> packages llvm-meta) or (… llvm-infra) module, something like that.
>
> We should also keep in mind that those CPU names are those defined by
> compilers themselves; they don’t have to match the vendor-chosen name or
> the name chosen by some other compiler.
>
> WDYT? Does that make sense?

That makes sense to me. I'm also going to look at moving
system->llvm-target to llvm-meta. I think its used with dlang.scm and
maybe elsewhere, or could be used at least. All these languages using
llvm as a backend means we keep on wanting to use these functions
elsewhere.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmXtbrQACgkQQarn3Mo9
g1GKoRAAp6XkyqyM+ht7vLIT1VLFWUBfLSto1DeVRei9al8ACA8xYNz+Ca75cXER
Oo4WcI8XNIsb9EDcqx3/wjEHpQS2O8G7rHpyDVsoGzAvTXEHJcmCpRjIA7iqo9Np
vBAPjNYKk2uxVyksAZh6ukVDIFlcoJMxyLSUaetoXuD8jlWIKbQVm7qlH3Jf3+68
jizRQoytEJssv/QcE072dIHPpHocdreWJn3fMRv0c4Xh+AzVUOFCSiF2lEyxTGbc
lax0Gf5U3RzKLlU40P5M6UuSMf8lMYbjKST2ayJxhxuHRtEnHSLUPHsuXyGykLFR
0V4vjGHDH3/NUdEbBn8UeIO78avhohrOLfbXEFZbHK2vP+RT7uhpGF3HzqX6FEEV
1UyXSApsoLbRy/TAU8XpZd7M2zEABpFAN9+TY1CPfXRi/UlCPtU+gbo6RSKmDFh/
BgJGU4jV5G0ryLrQuNfsoaMscgNDSicIHzSJUwt/HxNKTGVGPeqpApcHZjs6ayU6
seMrRqMBMbTgzC7PgSdwTu0+zxSBNGxg0qDrJFD5RHuGXp1xfGcVjMIT2lqIOvdd
nP5uMGnC7yPgagdSivMARM1v59CIM2c4qjadRrIBkkIqhTfeWeAesRaJ/TOqDCUQ
9aQZcyvA1hB0sJcMtsTdQ/FvfIBGk8LPKQor8r7hJKaCCqnKBEc=
=ZSmz
-----END PGP SIGNATURE-----


E
E
Efraim Flashner wrote on 10 Mar 11:51 +0100
Re: bug#69581: Acknowledgement ([PATCH 00/11] CPU tuning patches)
(address . 69581-done@debbugs.gnu.org)
Ze2QwCBDaXpEpsSz@3900XT
Patches pushed!

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmXtkMAACgkQQarn3Mo9
g1Fq7g/+JAoRileN4vwXbQ4GYdhspXEonwsigoqVdFUlamjysg7u1UDTDVm5Vrcj
mHsbJauGmnzSOX3WYTpEUF3hA2gK2H39ykaMD3Cz5VrsZOG8TYZsyTXckmjXy5DI
l8U+N/mQDyWrKU4h8TIeZ61lxYc5Gs6MeE2Dq3xeT0Oy9gxiWodT70cEBCP6wT5o
gUyUhdGiUmQO9OUuWRkHlhoXcLBlrdEbipwoKcCiZl5EESfzvlAyFsm8f2Ji9wqz
4C2gaqRWdNjnnBkqb/RMehFsog0W+Sp56GTckZnpN0qQ4mUicU1aiCJTXigLtajo
BN/Xg8hD++nmm5erWqQKuqDFyfyaeunJVsKwtqXGJtxBawZV7hJ0LDsDHQfuOGGx
/6uRg1sv4aPKs0Wr3bKRPmKlhqzHHAHfKmDYN+Xlaqghc4sdV9RGb7V/9TPIKfQr
cjt7Cz8iGgpES3tpYniKjuEp1Iuje1dsSc7IoGYRjuv5J+fAX+nxji4O6KvPaPV5
bpD5vBheoxQ7/p5291POQgKmyDLDUumsSga8ItUvJxhHd22SiqgUoIHL9caETNyZ
66M+sgMteBvu2o6boLARJCcmju6bBM9vLCxCriGtxFKAN2ne1/b1rZb72o79N/eX
DgPQAo12gqVTx/ODcdKrUg+wJO6gRWyUB3mvJQaH719nH9cjW04=
=jWuB
-----END PGP SIGNATURE-----


Closed
?