From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id +EucLk++o2ETpwAAgWs5BA (envelope-from ) for ; Sun, 28 Nov 2021 18:37:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id KBQ/Kk++o2GtHQAA1q6Kng (envelope-from ) for ; Sun, 28 Nov 2021 17:37:19 +0000 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 839D8848E for ; Sun, 28 Nov 2021 18:37:19 +0100 (CET) Received: from localhost ([::1]:50164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrO74-0004Ig-Oi for larch@yhetil.org; Sun, 28 Nov 2021 12:37:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34348) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrO6r-0004IK-TO for guix-devel@gnu.org; Sun, 28 Nov 2021 12:37:05 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:60938) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrO6p-00070K-CV for guix-devel@gnu.org; Sun, 28 Nov 2021 12:37:05 -0500 IronPort-HdrOrdr: =?us-ascii?q?A9a23=3Aa/udm68879FBnRRdnFxuk+BjI+orL9Y04lQ7?= =?us-ascii?q?vn2ZhyY1TiX+rbHJoB17726StN91YhsdcL+7VZVoLUmxyXcx2/hzAV9NNDOWxF?= =?us-ascii?q?dAb7sSkLcL+lXbalLDH5dmpNldmspFaOEYfGIK6foSuzPIaurIqePvmMuVbKXl?= =?us-ascii?q?vhVQpGdRBJ2IhD0JbzpzfHcZeOBuP+tJKLOsouRGuhu9cjAtYsygAH5tZZm4m/?= =?us-ascii?q?T70LznfD8bDFod5AOPlDOl76OSKWni4j4uFx1O3JY/+iz/nwb4/6WutOz+4hLQ?= =?us-ascii?q?zGPI9f1t6avc4+oGKsyQq9Qfbg/hjQulf+1aKsW/gAw=3D?= X-IronPort-AV: E=Sophos;i="5.84,326,1620684000"; d="scan'208";a="400227537" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Nov 2021 18:36:57 +0100 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: zimoun Subject: Re: build system option to allow CPU optimizations? References: <87ilwhu4zi.fsf@elephly.net> <86o867u6e1.fsf@gmail.com> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 8 Frimaire an 230 de la =?utf-8?Q?R=C3=A9volution?= 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: Sun, 28 Nov 2021 18:36:57 +0100 In-Reply-To: <86o867u6e1.fsf@gmail.com> (zimoun's message of "Fri, 26 Nov 2021 01:07:02 +0100") Message-ID: <87sfvg9o7a.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=192.134.164.104; envelope-from=ludovic.courtes@inria.fr; helo=mail3-relais-sop.national.inria.fr X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1638121039; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=i9vU2L4gTC8fKB86WnCMtxKr8avUZKyB+gAv9we8xZ0=; b=TwmjrNbUdfDzJKwGe501/JBFTFBC11s0Ttmobu80beL5bpjHAwOULmYB70Vb/HS3OyOb3I lmFhqzbgQrIuAnsyIob2BlDZnXHbpTo6s2gNvcYShm5T3nFJKQ1cSJOmsKc3ITzsep6PAG gtCZG+Bxa9xBygrXfQfUK1r0OJWvCqSlKI7OJNxhbpNy1UsvG1nsG0NqEdZNaZOG8CZ+r6 Uc0wt59m/X7edp8WsIrnyUU0XwL6jR1T9eVGIeN5/sZrUXVkenexG0l6bd/awJ+pUnZZhp 5yuodeich6891ru0nEWIpRBzjhysaL8Daf9pHo4Y2wwldNAFBG79TVEif/udrQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1638121039; a=rsa-sha256; cv=none; b=Xcn63eOlW80Pund3mnEhedYUUTG0tfqRElmXg9By4gLg9jKLa0Kq+YbIhm21VylApduVpX 2THObkey9mEcCEJBaiJ0DZq/IzjK8PeiMZH5c6qYw9e6jJ5ZIbGz/kg+h7uOFlB/GKrQS6 o28tmkRCUzgoYGQlIUZd4lw7g4NKkmP616YAv1ahBlLxE3DRZ1x/sA2z67mMsw8UxGjIwj jeevvQnRIP7uufBcap9H3Z4lXeZObBh5C8TXEGZTV3BgtzcdYsQDafLVpFOSz18O05cKhO I9B05DF/SjH0B2aASb/zwcmC8ktKOcPnudM/GcjyBwdYeU5Gdn29OROMlRPtBQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Spam-Score: -2.11 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 839D8848E X-Spam-Score: -2.11 X-Migadu-Scanner: scn1.migadu.com X-TUID: 5Df+9y42tO4Z Hi, zimoun skribis: > On Wed, 24 Nov 2021 at 13:10, Ricardo Wurmus wrote: > >> The build phases that patch out these features would have to check=20 >> for that build system option, much like they check the TESTS?=20 >> option before attempting to run tests. > > Then it could be a transformation. The idea sounds good to me. I=E2=80=99ve been working on it last week with my HPC hat on. To be clear, I think in may cases, passing =E2=80=98-march=E2=80=99 like yo= u suggest is the wrong approach; instead software should use (and usually does use) function multi-versioning: https://hpc.guix.info/blog/2018/01/pre-built-binaries-vs-performance/ I found one case though where this is not possible: C++ header-only libraries such as Eigen contain hand-optimized vectorized routines, selected at build time, but we end up compiling Eigen users as the x86_64/AArch64 baseline, which is a waste. (If you do know of other problematic cases, I=E2=80=99m interested in taking a look!) My solution to that is =E2=80=9Cpackage multi-versioning=E2=80=9D via a tra= nsformation option. Hopefully I=E2=80=99ll submit preliminary patches within a week or= so! Thanks, Ludo=E2=80=99.