Commit Graph

16 Commits

Author SHA1 Message Date
Efraim Flashner
cae9e9db32
cpu: Enable tuning for i686-linux.
* 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
2024-03-07 13:04:27 +02:00
Efraim Flashner
7700dc2cf5
cpu: Rename x86-64-v1 to x86-64.
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
2024-03-07 13:04:27 +02:00
Efraim Flashner
63165a9486
cpu: Be consistent with x86_64 micro-architecture names.
* 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
2024-03-07 13:04:27 +02:00
Efraim Flashner
29a9d0596f
guix: cpu: Update aarch64 CPUs.
* guix/cpu.scm (cpu->gcc-architecture): Update list of CPUs from the
list in gcc.

Change-Id: Ifcd26c143fc9e3aaa0c5514e1dac4908d2780255
2024-03-05 08:54:14 +02:00
Efraim Flashner
5dce7964ef
guix: cpu: Autodetect the x86-64-v4 microarchitecture.
* guix/cpu.scm (gcc-architecture->micro-architecture-level): Sort
gcc-architectures which have AVX512F support into x86-64-v4.

Change-Id: I8af0ceb692eefec7433e1fd5149379244da799c4
2024-03-05 08:54:13 +02:00
Efraim Flashner
b9f87817a1
guix: cpu: Update x86_64 CPUs.
* guix/cpu.scm (cpu->gcc-architecture): Add graniterapids-d,
pantherlake, clearwaterforest, arrowlake-s, yongfeng.  Remove
grandridge.  Update CPU flags for searching to match architecture.
(gcc-architecture->micro-architecture-level): Adjust listed
architectures and sort in order used above.

Change-Id: I186ab6e396e36c34f7c61827e02f637716993141
2024-03-05 08:54:13 +02:00
Efraim Flashner
1701b1244d
guix: cpu: Add gcc-architecture->micro-architecture-level mapping.
* guix/cpu.scm (gcc-architecture->micro-architecture-level): New
variable.
2023-07-12 16:48:28 +03:00
Efraim Flashner
4dd5fa9e76
guix: cpu: Refactor cpu->gcc-architecture.
* guix/cpu.scm (cpu->gcc-architecture): Refactor to wrap all the x86_64
options inside a common letrec-syntax.
2023-07-12 16:48:28 +03:00
Efraim Flashner
b93057256f
guix: cpu: Rewrite fallback for x86_64 cpu->gcc-architecture.
* guix/cpu.scm (cpu->gcc-architecture): Adjust the fallback case to use
cpu->micro-architecture-level.
2023-07-12 16:48:28 +03:00
Efraim Flashner
cb0cab2db0
guix: cpu: Add generalized CPU matching.
* guix/cpu.scm (cpu->micro-architecture-level): New variable.
2023-07-12 16:48:27 +03:00
Efraim Flashner
1bb29cd49c
gnu: gcc: Update cpu tuning architectures.
* gnu/packages/gcc.scm (%gcc-7.5-armhf-micro-architectures): Add missing
micro-architecture.
(%gcc-10-armhf-micro-architectures): Adjust accordingly.
(%gcc-11-aarch64-micro-architectures): Add missing micro-architecture.
(%gcc-12-aarch64-micro-architectures, %gcc-12-armhf-micro-architectures,
%gcc-12-x86_64-micro-architectures, %gcc-13-aarch64-micro-architectures,
%gcc-13-armhf-micro-architectures, %gcc-13-x86_64-micro-architectures):
New variables.
(gcc-12)[properties]: Use new compiler-cpu-architectures.
* guix/cpu.scm (cpu->gcc-architecture): Update entries for Intel, AMD,
x86_64 fallback and aarch64.
2023-05-09 09:52:24 +03:00
Efraim Flashner
fd00ac7e27
guix: cpu: Add detection for aarch64 CPUs.
* guix/cpu.scm (cpu->gcc-architecture): Add detection logic for aarch64
CPUs.
2022-05-17 15:19:41 +03:00
Efraim Flashner
41ed6db81e
guix: cpu: Add support for reading armhf/aarch64 CPUs.
* guix/cpu.scm (current-cpu): Set flags at the beginning of the loop.
Read from '/proc/cpuinfo' until the end of the file. Add match options
for discovering armhf/aarch64 cpu configurations.
2022-05-17 15:19:37 +03:00
Efraim Flashner
e8af2ea63a
gnu: cpu: Add detection for AMD CPUs.
* guix/cpu.scm <cpu>: Add vendor field.
(current-cpu): Also fill in the 'vendor' field.
(cpu->gcc-architecture): Add detection logic for AMD CPUs.
2022-02-13 14:58:43 +02:00
Efraim Flashner
73373ce5f8
guix: cpu: Rewrite based on feature flags.
* guix/cpu.scm (cpu->gcc-architecture): Rewrite detection based on
detected feature flags.
2022-02-13 14:48:08 +02:00
Ludovic Courtès
a644f88d28
Add (guix cpu).
* guix/cpu.scm: New file.
* Makefile.am (MODULES): Add it.
2022-01-01 15:23:24 +01:00