all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: "Ludovic Courtès" <ludovic.courtes@inria.fr>
Cc: Josselin Poiret <dev@jpoiret.xyz>,
	Simon Tournier <zimon.toutoune@gmail.com>,
	Mathieu Othacehe <othacehe@gnu.org>,
	Tobias Geerinckx-Rice <me@tobias.gr>,
	Christopher Baines <guix@cbaines.net>,
	74253@debbugs.gnu.org
Subject: [bug#74253] [PATCH] transformations: Add multituned-package.
Date: Sat, 23 Nov 2024 20:35:16 +0200	[thread overview]
Message-ID: <Z0IgZDbD7fZM8mn4@3900XT> (raw)
In-Reply-To: <87serwu4iq.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 3290 bytes --]

On Tue, Nov 12, 2024 at 11:31:57AM +0100, Ludovic Courtès wrote:
> Hi,
> 
> Efraim Flashner <efraim@flashner.co.il> skribis:
> 
> > * guix/transformations.scm (package-tuned-for-psabi,
> > multituned-package): New variables.
> >
> > Change-Id: I09ac7ae9fc2bcd9aa712b3c30fef807bc7d55895
> > ---
> >
> > This allows wrapping a package definition in multituned-package, ie:
> >
> > (define-public opus
> >  (multituned-package
> >   (package
> >    ...)))
> >
> > I'm not sure where to go with this patch from here. This will provide
> > the psabi libraries for x86_64 and powerpc64le so they get most of the
> > benefits from tuning for the architecture but without needing to specify
> > which architecture to tune for.  It should also provide a nice boost for
> > guix packs and docker images and the like.
> >
> > The downside with using this by default is the larger package size due
> > to the extra versions of the libraries, and if it is used then the
> > regular --tune is disabled for that package.
> >
> > I think adding it as a '--tune=generic' or '--tune=psabi' would be a
> > nice way to use it.
> 
> Should that be a package transformation though?  Could we instead have a
> build system trick or the ‘multituned-package’ procedure exposed so
> build the package several times and fill in lib/glibc-hwcaps?

I figured (guix transformations) worked well since it was using an
existing transformation to generate the different variants.

I'm not sure what you mean by a build system trick, like build the
package multiple times in one like with x265?

This exposes the multituned-package procedure (looks like I mistyped in
the commit message) which takes a package and can be just added on top
of an existing package definition, like hidden-package can.

> That way, packagers would explicitly choose this technique for select
> packages, which would then no longer need the ‘tunable?’ property.

Something like a flag in the build-system like #:tests? is? Or like a
package property?

> The question becomes: how would we choose which packages is eligible to
> this technique as opposed to ‘--tune’?  Intuitively, I would use that
> for general-purpose packages like ‘opus’, but keep ‘--tune’ for more
> niche/scientific packages.

Unfortunately I think just like with choosing what to do with tunable?
we end up in the same spot deciding somewhat arbitrarily what to provide
the psabi options for and what not to.

> WDYT?
> 
> Thanks,
> Ludo’.

Looking more at the patch I've remembered that I've only taken care of
the gnu- and cmake- build-systems.  I was going to add about tuning the
package on other architectures, like aarch64, but it seems I fixed that
already.

If it were just the configure-flags and the post-installation removal of
files then I could see trying to make something that could be inserted
manually into specific packages, but the whole thing rests on the
tuned-package procedure actually producing libraries tuned for the
different psABIs.

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2024-11-23 18:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08 10:44 [bug#74253] [PATCH] transformations: Add multituned-package Efraim Flashner
2024-11-12 10:31 ` Ludovic Courtès
2024-11-23 18:35   ` Efraim Flashner [this message]
2024-11-25  9:13     ` Ludovic Courtès

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=Z0IgZDbD7fZM8mn4@3900XT \
    --to=efraim@flashner.co.il \
    --cc=74253@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    --cc=guix@cbaines.net \
    --cc=ludovic.courtes@inria.fr \
    --cc=me@tobias.gr \
    --cc=othacehe@gnu.org \
    --cc=zimon.toutoune@gmail.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.