[PATCH] gnu: ci: Build tuned packages for common baselines.

  • Open
  • 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 10 Dec 2023 08:52
(address . guix-patches@gnu.org)
7c09a597a23276e1987898022ff7f0e145c9fd8a.1702194739.git.efraim@flashner.co.il
* gnu/ci.scm (%x86-64-micro-architectures): Replace specific
micro-architectures with generic ones.

Change-Id: Iee2f65376a00ad2ee5fb393c2e64c07f866d8116
---
gnu/ci.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (19 lines)
diff --git a/gnu/ci.scm b/gnu/ci.scm
index 279dd4d910..5c093ae135 100644
--- a/gnu/ci.scm
+++ b/gnu/ci.scm
@@ -372,7 +372,7 @@ (define package->job
(define %x86-64-micro-architectures
;; Micro-architectures for which we build tuned variants.
- '("westmere" "ivybridge" "haswell" "skylake" "skylake-avx512"))
+ '("x86-64-v2" "x86-64-v3" "x86-64-v4"))
(define (tuned-package-jobs store package system)
"Return a list of jobs for PACKAGE tuned for SYSTEM's micro-architectures."

base-commit: 9c30fb27a42bf10a733ef5165df7869588f0b27c
--
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 11 Dec 2023 22:37
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . guix-patches@gnu.org)
87y1e02zft.fsf@chbouib.org
Hi,

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

Toggle quote (19 lines)
> * gnu/ci.scm (%x86-64-micro-architectures): Replace specific
> micro-architectures with generic ones.
>
> Change-Id: Iee2f65376a00ad2ee5fb393c2e64c07f866d8116
> ---
> gnu/ci.scm | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gnu/ci.scm b/gnu/ci.scm
> index 279dd4d910..5c093ae135 100644
> --- a/gnu/ci.scm
> +++ b/gnu/ci.scm
> @@ -372,7 +372,7 @@ (define package->job
>
> (define %x86-64-micro-architectures
> ;; Micro-architectures for which we build tuned variants.
> - '("westmere" "ivybridge" "haswell" "skylake" "skylake-avx512"))
> + '("x86-64-v2" "x86-64-v3" "x86-64-v4"))

Right now, on my laptop, I get:

Toggle snippet (14 lines)
$ guix build gsl -n --tune
guix build: tuning gsl@2.7.1 for CPU skylake
substitute: updating substitutes from 'http://192.168.1.48:8123'... 100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
1.5 MB would be downloaded:
/gnu/store/kx060kry6ka7khzganfcqk98agqp226i-gsl-2.7.1
$ guix describe
Generation 284 Dec 10 2023 23:34:41 (current)
guix a90bc8b
repository URL: https://git.savannah.gnu.org/git/guix.git
branch: master
commit: a90bc8b6a82e094b10488030532cf4cd690ce57e

Which is nice!

With the proposed change, I’d no longer get substitutes.

So perhaps we could keep the common Intel variants in addition to the
SysV psABI generic names?

Maybe we can drop “westmere” now since it’s relatively old.

WDYT?

Ludo’.
E
E
Efraim Flashner wrote on 12 Dec 2023 12:27
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . guix-patches@gnu.org)
ZXhDlzHQOYTY-iw4@3900XT
On Mon, Dec 11, 2023 at 10:37:26PM +0100, Ludovic Courtès wrote:
Toggle quote (49 lines)
> Hi,
>
> Efraim Flashner <efraim@flashner.co.il> skribis:
>
> > * gnu/ci.scm (%x86-64-micro-architectures): Replace specific
> > micro-architectures with generic ones.
> >
> > Change-Id: Iee2f65376a00ad2ee5fb393c2e64c07f866d8116
> > ---
> > gnu/ci.scm | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/gnu/ci.scm b/gnu/ci.scm
> > index 279dd4d910..5c093ae135 100644
> > --- a/gnu/ci.scm
> > +++ b/gnu/ci.scm
> > @@ -372,7 +372,7 @@ (define package->job
> >
> > (define %x86-64-micro-architectures
> > ;; Micro-architectures for which we build tuned variants.
> > - '("westmere" "ivybridge" "haswell" "skylake" "skylake-avx512"))
> > + '("x86-64-v2" "x86-64-v3" "x86-64-v4"))
>
> Right now, on my laptop, I get:
>
> --8<---------------cut here---------------start------------->8---
> $ guix build gsl -n --tune
> guix build: tuning gsl@2.7.1 for CPU skylake
> substitute: updating substitutes from 'http://192.168.1.48:8123'... 100.0%
> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
> 1.5 MB would be downloaded:
> /gnu/store/kx060kry6ka7khzganfcqk98agqp226i-gsl-2.7.1
> $ guix describe
> Generation 284 Dec 10 2023 23:34:41 (current)
> guix a90bc8b
> repository URL: https://git.savannah.gnu.org/git/guix.git
> branch: master
> commit: a90bc8b6a82e094b10488030532cf4cd690ce57e
> --8<---------------cut here---------------end--------------->8---
>
> Which is nice!
>
> With the proposed change, I’d no longer get substitutes.
>
> So perhaps we could keep the common Intel variants in addition to the
> SysV psABI generic names?
>
> Maybe we can drop “westmere” now since it’s relatively old.

I'm not sure how we'd determine what would count as common. I think if
we added a '--tune=close-enough' and used cpu->micro-architecture-level
or gcc-architecture->micro-architecture-level from (guix cpu) to choose
x86_64-v[234] that would count more as common than the list above :P.

westmere and ivybridge didn't make the cut in (guix cpu), so they'd
never get chosen from '--tune'.

--
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-----

iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmV4Q5IACgkQQarn3Mo9
g1GMrg/+LjdR4ESH8CfSTciZoORHFGuk7RABY12am6AlA+fpdTarBVPGPHimictP
Yf8ewkiowVEmNS6tVFr/bvL4IE5uNxh3QU/AtNaMT/xVkNhr48plOhLdpDMWKuCJ
h4wP+JwM8XxS2aUgAXatvqacp+HJpRVY+YAb6AoHoGpsAI5cjZblvo4MZBJHGVwo
tpsdNoiC0KlgzS4MvNtnsJAfTqMigqTel2hYKBSKumm32a3Vm+Ayhz9Itztmjzem
FiPAaNWXSF9gQ5e5Lo1T9KHCNx+TxyEYjvS6hW8qsBvbwoDfGUggQXnDXglcYwRt
7SykpkBWj1CaNDtN9iOLaVSW9tYorHcw1nnpAYOzBYw+dQr4bHL6h0c/Y1/M13ck
cS+IhScoRKV7eQx4Ndbe2Q+ilRXm9i7jgU8rtNUNj1igRRHcDqPIKoZ/BVFir+b1
kVSppCDRu0/qGXzjbeMq4io0XPb0F0ikaQGtSMYrPh6urYFNGEsXZ0WcUl7c6FH5
stcuw7kkuq89jrVzuk6fEDlZPJEoYmycPhgt9MS6koP0FkrTFEzQW1l+3tjgcwez
z+1+iy9h8Tg72Ld9bKCig6VnBEilcMq/M/hURVtMDZi19jzSCobv8LzMGIiADpnZ
7si2u/A+pGObV4SDJIg1ZA7gOLeeoz16C9BuMRsjctNkc+WwZEQ=
=aoPp
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 18 Dec 2023 23:26
Re: [bug#67742] [PATCH] gnu: ci: Build tuned packages for common baselines.
(address . guix-patches@gnu.org)
87zfy7i1v2.fsf@gnu.org
Hello,

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

Toggle quote (2 lines)
> On Mon, Dec 11, 2023 at 10:37:26PM +0100, Ludovic Courtès wrote:

[...]

Toggle quote (11 lines)
>> > (define %x86-64-micro-architectures
>> > ;; Micro-architectures for which we build tuned variants.
>> > - '("westmere" "ivybridge" "haswell" "skylake" "skylake-avx512"))
>> > + '("x86-64-v2" "x86-64-v3" "x86-64-v4"))
>>
>> Right now, on my laptop, I get:
>>
>> --8<---------------cut here---------------start------------->8---
>> $ guix build gsl -n --tune
>> guix build: tuning gsl@2.7.1 for CPU skylake

[...]

Toggle quote (5 lines)
> I'm not sure how we'd determine what would count as common. I think if
> we added a '--tune=close-enough' and used cpu->micro-architecture-level
> or gcc-architecture->micro-architecture-level from (guix cpu) to choose
> x86_64-v[234] that would count more as common than the list above :P.

Sure, but that’s not the case yet:

Toggle snippet (6 lines)
$ ./pre-inst-env guix build gsl --tune -n
guix build: tuning gsl@2.7.1 for CPU skylake
1.5 MB would be downloaded:
/gnu/store/kx060kry6ka7khzganfcqk98agqp226i-gsl-2.7.1

So my suggestion was something like this:

(define %x86-64-micro-architectures
;; Micro-architectures for which we build tuned variants.
'("ivybridge" "haswell" "skylake" "skylake-avx512"
"x86-64-v2" "x86-64-v3" "x86-64-v4"))

… so we don’t lose substitutes for “common” architectures.

Alternatively, we can go towards using x86-64-v* only, but in that case
we need to adjust the way ‘--tune’ (without arguments) guesses the
target architecture.

WDYT?

Ludo’.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 67742@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 67742
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch