From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ECgfIWsRuGElNgAAgWs5BA (envelope-from ) for ; Tue, 14 Dec 2021 04:37:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 2PTKHGsRuGHvQwAAB5/wlQ (envelope-from ) for ; Tue, 14 Dec 2021 03:37:15 +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 1A6643022E for ; Tue, 14 Dec 2021 04:37:15 +0100 (CET) Received: from localhost ([::1]:52300 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwycs-0005hJ-41 for larch@yhetil.org; Mon, 13 Dec 2021 22:37:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48070) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwycW-0005gw-8o for guix-devel@gnu.org; Mon, 13 Dec 2021 22:36:52 -0500 Received: from [2607:f8b0:4864:20::831] (port=33293 helo=mail-qt1-x831.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mwycU-00039n-HA for guix-devel@gnu.org; Mon, 13 Dec 2021 22:36:51 -0500 Received: by mail-qt1-x831.google.com with SMTP id n15so17385714qta.0 for ; Mon, 13 Dec 2021 19:36:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=w65yHJgbG+7spgVh+ztCs6ufZNgld0X6kBOszDtA260=; b=g9mQnFYJ5OsvWNRz0WOgbG14yTVj8QZD+Hwu0X5a89O9r1Oz7iKuKq9+iT0J2/Ls8i Dy3Q+KflC7vmfbCKGQ77N+1ovipno4CWU/VLXueGIBG0r6cLnDQ44hl2QVjA2oQZJgMl yG0Hdnv6D2jusskDBhnrW0tkoT7NJ0kOFgQiclS0qBPj8c4xFtgBLBEJNQeX3aDm+8QO zs9nVKqyxwODRNHDT6kI0ohzlIJIwNwFbp2Yp+Zo6O2nOJWhw7slro47woJfyzsZIYAi B3YB9dwYFbdq6fiL+8gqCL+BtK4ODr6UMplDisAEwhoWLbY7BhXiVhW/BZE+pG6kpqZe Hq1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=w65yHJgbG+7spgVh+ztCs6ufZNgld0X6kBOszDtA260=; b=Brv7eLt27qlM7ZMVhqfYR2Cke8fAXCWifXOMk75MmEWm5bKKMMv0tElC9o3x+I7gv0 l734FXlGLi4WhYDMj2W2vZl2GsbZtu0OI0f8rAHtiZ3LMe686kwDWUhc3vQDYIxZLezj vvJYsJ2G3h3zqFqpTQ3VBydE9HPdOiWuqkrx33S+mOlimicY0G07ca68CEewub7kGR+T MVQPrM9d6HmwwDmrceLc5B1HKQLPAS4M/ECPrwvJ5DDjflzvJLVLZaGOzz8FRexiGD+A iSCOq20QO1U8xeJLv8E7vuZVtQbPcDNtnehFoBFSOrk10BTsuha4QLlvBFyL4y5QE1a5 3rQw== X-Gm-Message-State: AOAM531xUza0GwsTPne5XqpGqfucrlXK3cM9sFRNHawhSJX6HMa1ec+A dok5lWMEZ0TEReZPVBXabhmJACyCnFM= X-Google-Smtp-Source: ABdhPJxQRF+7kHFA6GcplTER6Kxip0ZhBmrsjnO5fyvl9i3Eu6vBtIeEat9g6mVbRS48f5yVg22jDw== X-Received: by 2002:ac8:7e88:: with SMTP id w8mr3092695qtj.357.1639453009248; Mon, 13 Dec 2021 19:36:49 -0800 (PST) Received: from hurd (dsl-10-141-188.b2b2c.ca. [72.10.141.188]) by smtp.gmail.com with ESMTPSA id k1sm6748810qkh.53.2021.12.13.19.36.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Dec 2021 19:36:48 -0800 (PST) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: build system option to allow CPU optimizations? References: <87ilwhu4zi.fsf@elephly.net> <86o867u6e1.fsf@gmail.com> <87sfvg9o7a.fsf@gnu.org> Date: Mon, 13 Dec 2021 22:36:47 -0500 In-Reply-To: <87sfvg9o7a.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Sun, 28 Nov 2021 18:36:57 +0100") Message-ID: <87mtl3c0xc.fsf@gmail.com> 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 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::831 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::831; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qt1-x831.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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=1639453035; 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:dkim-signature; bh=w65yHJgbG+7spgVh+ztCs6ufZNgld0X6kBOszDtA260=; b=o3aca2eEwBesZiFIChZ+iqt3waF228a5VzddgmlSJaSnyFwqDuDe9kTODXoiSW2742gp53 NNvLuQrtLKRnGR6cJSO4Vo4V4EAMuOQ6HDdlU2uthAwqnDQ3CN8L/aCsM2QY2mo7iYK9Af gLwlKkDmvVKMg1hz3h4VKFkVb1+PT1uQMQyPnv50ziVUAKqA0sbeoDzTpzcEsIwsQIICEN 7RTtgFeqTkF3o03ch0sNnRulCZFOutkg9BvWD/oRM9vISecL54gtTRJkuNFL08krTAc+Gw ntp45hOflKWc7RLjoeTnIA7TAPke9HNKyaP9Z19A6R0Ob6Ukh2dUTnflGRM7Lw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639453035; a=rsa-sha256; cv=none; b=n2u8M2CkhBJiy0evrJC8/wBXQCE7Jq21dssU0nhpE6pf+L04dM3aohUrP6ofVPgb5d3Bmm ngaufuVC+KDhR3A6uRvLxK02mG7bq6X9wJ9NzzfOoAtZnbYORDy2uQQkW9s81iDmbFID/d 7NXupenJwjauewud+wD+H06FqjzaT+PBz0TIL/dgHyO291VrJW0z/5wfaQHh1j1Tfavw1r B4IkjtxnJdhHGbXJOytlt8o63HYvGdoqbH2ah61+DLr109DbMIgadPTGacWuFVHxNrdeZu jMhGqdUJqM5OFDn3x4nLNMLtpVkUi3hELXobdFBhm6hJMrap8tG4dUH9gWK4gA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=g9mQnFYJ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -0.87 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=g9mQnFYJ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1A6643022E X-Spam-Score: -0.87 X-Migadu-Scanner: scn1.migadu.com X-TUID: Ex9vEsbJPP3Y Hi Ludovic, Ludovic Court=C3=A8s writes: > 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 = you 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!) I think that 'atlas' is such an example of a package that uses multi-versioning but fails to build reproducibly depending on the exact CPU it was built. I've reported that here [0]. [0] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D51536 Thank you, Maxim