From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id ME+fLDpmtWS8jgAASxT56A (envelope-from ) for ; Mon, 17 Jul 2023 18:03:06 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 6FHlKzpmtWQUWQEAG6o9tA (envelope-from ) for ; Mon, 17 Jul 2023 18:03:06 +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 4BA433F2EA for ; Mon, 17 Jul 2023 18:03:06 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b=pFWH6O1Q; 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=fail reason="SPF not aligned (relaxed)" header.from=inria.fr (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1689609786; 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: content-transfer-encoding:content-transfer-encoding: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=oA8vaJonNeyBQPqhUKXaEPZ89dW5h2t3RrTjEpBXPm8=; b=JsJ3H9NQ+AsiqMxNw8f6RTlACdqEymFlL8lc6a2b90swQ1glmzZazxuYgIbcH/jvExcIvG frlqm0rE2/coxhqvuRRq3MNZJ7zQp+UcMnPfjGX7KxbzJqBF82TdDDA8bXY4iAFhm09R+3 2JLRG848I33Qdw152XIMV0zPEjdC74G15A2Z4cFT/76xtvzFy6QRw7X7VXVB7R/asMf1fF hL+Y1nrmKrfdFGQ0V6/n8n8VP02djfbFEc/KEarsnlDngRvMnbhFztp7/GvatZ3rHFocFb Y3U72KAOuMs6wNVe6buesoNitOZa1FaO65hx75lIRWyhPtFktXkV3mLfgb3EPw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689609786; a=rsa-sha256; cv=none; b=Q0qf8yreTXBV8hcOtTtlYNcF/afZH4BiQPeaSHgbRolDKEbLhFx4oio4q5C8ptRxbW+Wzy q+VaBGrrE6ZR/jVK6U9hT4i4YTSeouEJdWqVdyMiDkibBF4Ct4shnFt7NTPWKhLD8BJ7DR wCi9D8B0Np9PueMHRI2md1LJGnez5ZGUyD2t/lwROCFqYbq77CYQ+jdPjE8vW4g1UBG4p5 E+EcRtyKEHJQAh/PJQgUmwUHesFjEoqgQks4qIEVcke3/JyrGvRJQO7SYKQaomz38JfX5U Z5GwRzxfF85IbRfeXfXxgavDHqokSQwdAjbqZy2b8E2eU/p4x/tgoSjlfp1mIA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b=pFWH6O1Q; 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=fail reason="SPF not aligned (relaxed)" header.from=inria.fr (policy=none) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qLQMQ-0002ws-PQ; Mon, 17 Jul 2023 11:42:07 -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 1qLQMM-0002wd-F7 for guix-patches@gnu.org; Mon, 17 Jul 2023 11:42: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 1qLQMM-0008G6-19 for guix-patches@gnu.org; Mon, 17 Jul 2023 11:42:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qLQML-0000bE-Sg for guix-patches@gnu.org; Mon, 17 Jul 2023 11:42:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64188] [PATCH 0/8] More package tuning Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Jul 2023 15:42: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: Efraim Flashner 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.16896085062284 (code B ref 64188); Mon, 17 Jul 2023 15:42:01 +0000 Received: (at 64188) by debbugs.gnu.org; 17 Jul 2023 15:41:46 +0000 Received: from localhost ([127.0.0.1]:50787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLQM6-0000ak-CK for submit@debbugs.gnu.org; Mon, 17 Jul 2023 11:41:46 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:32018) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLQM2-0000aS-If for 64188@debbugs.gnu.org; Mon, 17 Jul 2023 11:41:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version:content-transfer-encoding; bh=oA8vaJonNeyBQPqhUKXaEPZ89dW5h2t3RrTjEpBXPm8=; b=pFWH6O1QPUzJqwe1CMw2xEVoukKWVDdcE6XOmSIColZpxbr5mQVro46Y 3t1Z9vNp2Osabb06tXzR2VvvxIVQFiaiv+Ih4k0pwZBizMyQqnGtId9Z5 YSi0yVgWFcB7PHHwvaxwiD3ArKibJAlDuhIlJuZ/a0DOYhCXCfRv0TFw8 w=; X-IronPort-AV: E=Sophos;i="6.01,211,1684792800"; d="scan'208";a="61573614" Received: from unknown (HELO ribbon) ([193.50.110.205]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2023 17:41:36 +0200 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87352fz2m9.fsf_-_@gnu.org> <871qhbzvae.fsf_-_@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Nonidi 29 Messidor an 231 de la =?UTF-8?Q?R=C3=A9volution, ?= jour du =?UTF-8?Q?Bl=C3=A9?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 17 Jul 2023 17:41:35 +0200 In-Reply-To: (Efraim Flashner's message of "Mon, 17 Jul 2023 15:02:02 +0300") Message-ID: <87wmyypmts.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-Spam-Score: -3.56 X-Spam-Score: -3.56 X-Migadu-Queue-Id: 4BA433F2EA X-Migadu-Scanner: mx1.migadu.com X-TUID: y6H/UYNlJiCN Hi, Efraim Flashner skribis: > On Thu, Jul 13, 2023 at 05:27:21PM +0200, Ludovic Court=C3=A8s wrote: [...] >> It looks like we=E2=80=99re now adding the =E2=80=98set-microarchitectur= e=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-bench= marks-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-benc= hmarks-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-co= mpiler=E2=80=99 >> that would return a wrapper around the =E2=80=9Cgo=E2=80=9D binary that = would 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. Actually I thought so too. :-) But anyway, the point is that we=E2=80=99re modifying phases unconditionally (whether or not this has an effect), and it would be nicer to avoid it IMO. > 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 :) Not a valid argument! :-) We can discuss the implementation on IRC if you want. It might be that we can slightly generalize =E2=80=98tuning-comp= iler=E2=80=99 so that it works for go (perhaps there=E2=80=99s an option like =E2=80=98-m= arch=E2=80=99 that we could use instead of setting =E2=80=98GOAMD=E2=80=99?). Thanks in advance! Ludo=E2=80=99.