From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id AEKJEf4ttWRj5QAASxT56A (envelope-from ) for ; Mon, 17 Jul 2023 14:03:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KDooEf4ttWTagAAAauVa8A (envelope-from ) for ; Mon, 17 Jul 2023 14:03:10 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 972445B208 for ; Mon, 17 Jul 2023 14:03:09 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=IYkkyAbo; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1689595390; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=jEUZQcoWxUjhDeHgJOfDc44hR7mg2ADzmXMExHo0a5I=; b=W94SaXsxJXCGB/6zw8mvSunGwrhg2S6Z84AHcKjtQOkx1DgnKeqMEzAJd1RuVI1o7WknNB Q9B/SMkDlYJ6gcSTIs7Z61J78n3fHapmkcya7MuMmXdrysUXsHcusRj1s7shQvb9V4qFjB 4jcCQaVZdvvZeLhwoHJWdg8VxidCf9ZF2LSp2gaGdFBilWtZHgT/ajLLE//xsVznYTku3j 9QKO2YnvtcXSKA2Z9Jq4qUF3bVByR3WtFxVhHnlQEEbcjlMkb56Cn5AxbxDp2HQ+y2s3eq F9J2Fz3A518a4BKXRFvakuQMdX0+mkDamYYrOrBZRVIaB44wIfxZ8gjsNb33Jg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=IYkkyAbo; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689595390; a=rsa-sha256; cv=none; b=AJ633FS7WMb/yJlPq1Ga8CwnDAm8lcx7AaCoYrmJ50A00+1RYlIGSZ0X73/4I/lePziW7A mLn5cNPo28+o5G+q8YIWvr+IrxGUSv2Tvq6AzGfZy+fVFCbf3fV9dnYl2dmkx9Dv60QhUO uJSfaHguR51rV1YoNHR/ERxjm6M94yaRRQldr0vbewAsHbM6EfXAN359uL6nGoQXInaQsr P5JfeiRPLmUVQAS9nXnwKHHV1951m6i8Jxt8gMEgeWIq0ZsZ73kVCsoWTur1vSYFGwGK7p QfXjYTU5QMEETpuPA12HLN+z2GCAm7Ny8DZbdjJqpPQp6+/tGTvV+dWnTYv+dw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qLMwS-0000G2-Bj; Mon, 17 Jul 2023 08:03:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qLMwQ-0000Fe-8x for guix-patches@gnu.org; Mon, 17 Jul 2023 08:03:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qLMwQ-0006NH-0b for guix-patches@gnu.org; Mon, 17 Jul 2023 08:03:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qLMwP-0000Lw-Ru for guix-patches@gnu.org; Mon, 17 Jul 2023 08:03:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64188] [PATCH 0/8] More package tuning Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Jul 2023 12:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64188 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Josselin Poiret , Tobias Geerinckx-Rice , Simon Tournier , Mathieu Othacehe , Christopher Baines , 64188@debbugs.gnu.org, Ricardo Wurmus Received: via spool by 64188-submit@debbugs.gnu.org id=B64188.16895953331297 (code B ref 64188); Mon, 17 Jul 2023 12:03:01 +0000 Received: (at 64188) by debbugs.gnu.org; 17 Jul 2023 12:02:13 +0000 Received: from localhost ([127.0.0.1]:49237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLMvc-0000Kr-V8 for submit@debbugs.gnu.org; Mon, 17 Jul 2023 08:02:13 -0400 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]:46401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLMva-0000Kd-Fi for 64188@debbugs.gnu.org; Mon, 17 Jul 2023 08:02:11 -0400 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-3fc0aecf15bso43541975e9.1 for <64188@debbugs.gnu.org>; Mon, 17 Jul 2023 05:02:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689595324; x=1692187324; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=jEUZQcoWxUjhDeHgJOfDc44hR7mg2ADzmXMExHo0a5I=; b=IYkkyAboixajNRweXLIWtyH3l+taqibG15gzwSXle25ME6FuyRtcNbMzGHwuhKzRFL v9h0fnGnsrD2MZFDJx5DEfa88iju+sapIud0n6oooCXw1lBB12DJIUlgpauTF79agJju CNewerwIpS5MFAITdt7waoLXSs9COrtRGMVB1nC2BiEuyQhSNGfm48mgDX9efls1E+YL TptGG9AiI5R8+4yKb/QED60tuxvWLD/ER3JZMkZ7qOZGBiYTVF1fbzwnv+MrkRTnM+1J a0e7jquUyiBeFi/FBnJoGkksJCMCAh4xj4iHzyFed91YODQAZbqysA6aOINXL/nbBZ0K q8pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689595324; x=1692187324; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jEUZQcoWxUjhDeHgJOfDc44hR7mg2ADzmXMExHo0a5I=; b=QroU/7AdTM15ujxxOSHPAF2pE2PdBc59tjVpjeKgLhGnd4JznIjTb+yIaUym0CiolO uGNiR6ZUNd+RxqEXTRLUCjEKm0UQMggvN7jRZuZayWGIZGPItPP5Dc2dg0ctrMCV4kiI WEL+Xa5k/GftnzceBISFFjol2O6eJrBvDxOxJbaZpOCVUP29dqmN5US9oViwNVYsM9aK JbaW2L3u9ndJ+6OUhMc2H53AL5TX25N/LUfDtWYqdtjNdoKynKJg0sfUrxuqBtnC5dz1 Ir8PGPoHyN4ma7bjrrnAKn2LlVbrtbaqlqRbPgTZxBgmpVEPdyu1e0zUaa1YbCHw4FLq gbFA== X-Gm-Message-State: ABy/qLYxXMlZrQyKJKR1Cd51Hch1rQ5DnXdobabpQ5ZuykqT/mwst/k0 kZ2z9DkifehynhPCkjabx+A= X-Google-Smtp-Source: APBJJlHr659DsBpl6Lx2hJkZn1vDeBJ9aP1NMHEMR3yRkxr6HSuFSM0dAhHnr/XhltWZ1/AODi9zGg== X-Received: by 2002:a05:600c:210c:b0:3fb:dd9c:72d2 with SMTP id u12-20020a05600c210c00b003fbdd9c72d2mr10657063wml.31.1689595324336; Mon, 17 Jul 2023 05:02:04 -0700 (PDT) Received: from localhost ([2a02:ed3:914:a500:bdef:3269:70ba:bfc8]) by smtp.gmail.com with ESMTPSA id q17-20020a7bce91000000b003fc0062f0f8sm8025680wmj.9.2023.07.17.05.02.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jul 2023 05:02:03 -0700 (PDT) Date: Mon, 17 Jul 2023 15:02:02 +0300 From: Efraim Flashner Message-ID: Mail-Followup-To: Efraim Flashner , Ludovic =?UTF-8?Q?Court=C3=A8s?= , 64188@debbugs.gnu.org, Christopher Baines , Josselin Poiret , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice References: <87352fz2m9.fsf_-_@gnu.org> <871qhbzvae.fsf_-_@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="/sNiu/+iZvYQGNHa" Content-Disposition: inline In-Reply-To: <871qhbzvae.fsf_-_@gnu.org> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx0.migadu.com X-Migadu-Queue-Id: 972445B208 X-Migadu-Spam-Score: -5.25 X-Spam-Score: -5.25 X-TUID: IjH66MHjy3qA --/sNiu/+iZvYQGNHa Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jul 13, 2023 at 05:27:21PM +0200, Ludovic Court=C3=A8s wrote: > Hi Efraim, >=20 > Thanks for pushing this patch series past the finish line! >=20 > Efraim Flashner skribis: >=20 > > I'll look to see how to move this into > > build-system-with-tuning-compiler. I think I previously got hung-up on > > the tuning-compiler function which wouldn't work for go. At first glance > > it looks like I could just lift-and-shift the extra phase over. I'll > > just have to make sure that either it's only for the go-build-system or > > occurs sometime after the setup-go-environment phase but before/after a > > phase which exists in all build systems. Then it's the toss-up between > > leaving it as-is and only occurring with the go-build-system or also > > occurring on any tuned package which also has go code. >=20 > It looks like we=E2=80=99re now adding the =E2=80=98set-microarchitecture= =E2=80=99 phase > unconditionally, not just for go. For example: >=20 > --8<---------------cut here---------------start------------->8--- > $ ./pre-inst-env guix build --tune eigen-benchmarks --log-file > guix build: tuning eigen-benchmarks@3.4.0 for CPU skylake > https://ci.guix.gnu.org/log/djwka1jhzhk08yb23as83yk5hysn0pky-eigen-benchm= arks-3.4.0 > $ wget -qO- https://ci.guix.gnu.org/log/djwka1jhzhk08yb23as83yk5hysn0pky-= eigen-benchmarks-3.4.0 |gunzip -c| grep -C3 set-micro > phase `reset-gzip-timestamps' succeeded after 0.0 seconds > starting phase `compress-documentation' > phase `compress-documentation' succeeded after 0.0 seconds > starting phase `set-microarchitecture' > Setting GOAMD to "v3". > phase `set-microarchitecture' succeeded after 0.0 seconds > @ build-succeeded /gnu/store/pdz0g9q2yd9i1jkbhk2rnbfa88ngvffw-eigen-bench= marks-3.4.0.drv - > --8<---------------cut here---------------end--------------->8--- >=20 > What I had in mind was to have a procedure similar to =E2=80=98tuning-com= piler=E2=80=99 > that would return a wrapper around the =E2=80=9Cgo=E2=80=9D binary that w= ould set > =E2=80=98GOAMD=E2=80=99 (or similar). That way the change would be well = isolated. >=20 > Could you look into providing a patch for that? >=20 > Thanks in advance! >=20 > Ludo=E2=80=99. That's actually really surprising to me. I thought that if you tried to add a phase after a non-existent phase then it just wouldn't be added. I tried just wrapping the call to the 'go' binary itself so that every time 'go' was called it would also set the environment variable setting the optimization level but I was having a hard time working that. While experimenting I did change what I had written to check for the 'setup-go-environment phase, and if it existed to add the optimization at the end of that phase. I have the part with wrapping the go binary as a WIP, and when it's ready I'll post both parts so we can choose which one seems better. I like the idea of go being wrapped, it makes it easier to just add in the optimizations whenever go is added to a package. On the other hand I like the extra phase, since it's already done :) --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --/sNiu/+iZvYQGNHa Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmS1LbcACgkQQarn3Mo9 g1GFPRAAtlZfGzO8ZjjOSmGsPQt1DB2lmKogOiILcYHVrSP6np2AUzyB6qJ3JQsw +BdtzV9MjCzy3cdtjgjmL6lrw21cj1YBRCgaLAE3x+s+ZBIPpwH5T/0NA5MsOKei f6wKXFGbf0j/thwbzxW7QOf4XTT3KF/gCOhC2xQhzOF2hPFs0MWR0GMsQj8I+B5E hzmzntHavs8LBrysUz1Z9wGdWdmrIxPLkI6hybV7CUgYFuqAnIFEcbluEzYyD9hA OlRwx7H4Y2153dRFXoABaFhbaNDgNfZL7uJr7ORO/IgOGQegoq3yHCSQ1rNzIkqM +1Vs4tbI4gwmFrE2Ihmv1pCv57GJ6iVkp7y2ROhQlJxrj5nMrzQODjgZXgH5d/Vd aS2OM2iFm9cwdh5q1ThaPoqQdhOWMDDHCoCZnT4A0lbSiFOL9r/JofpZSj3DqmCn DIQjmmap0cesgGcSPiT9yWAO6urP7GWXkSiwyzxJ2mkSvaxAqsQCVqmaCRdzWGH0 RW0gQNJ1AtKoQc8dfSDscbJvExN91JPicefWP7/dXqo/uW6lSL/hhrbEcFT2/bFi Z7syi5MtRhVsw5qhtmaZBgWVafNBkYU+iVYNtY7zvTqfuh17CKia3KGDPl0WO/P9 FoTZ2z7Wm5TjHn8Emmsv51E6KbJeYi8iKC1y/qH4Sq4PWAKaiZs= =B0mm -----END PGP SIGNATURE----- --/sNiu/+iZvYQGNHa--