From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: CPU-specific builds Date: Sun, 02 Oct 2016 15:33:54 +0200 Message-ID: <871szyho3h.fsf@gnu.org> References: <5985e2f0-edd3-c40b-bb10-f84b233bb48d@uq.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bqgu1-0001ek-6p for guix-devel@gnu.org; Sun, 02 Oct 2016 09:34:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bqgtx-00034P-VS for guix-devel@gnu.org; Sun, 02 Oct 2016 09:34:01 -0400 In-Reply-To: <5985e2f0-edd3-c40b-bb10-f84b233bb48d@uq.edu.au> (Ben Woodcroft's message of "Sat, 1 Oct 2016 20:43:04 +1000") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ben Woodcroft Cc: "guix-devel@gnu.org" Hi Ben, Ben Woodcroft skribis: > Currently, we build a single set of x86_64 packages assuming SSE but > not SSE2 instructions, but sometimes it would be nice to use more > recent instructions like AVX. Isn=E2=80=99t SSE2 part of the x86_64 base spec? I always forget. > So I'm wondering if there is some way to specify a system more > specific than 'X86_64'? I tried simply adding '--with-arch=3Dhaswell' as > a configure argument in gcc-4.9 so that flag became the default for > gcc usage and saw some performance improvements, though I did have to > disable tests in gnutls. Do you have performance figures for some CPU-intensive applications? What software are you most interested in? > Hardcoding that configure flag is definitely less than ideal, I'm > wondering if there is some better way that would enable us to share > package updates and even substitutes for these systems? My initial > thought is extending the triplet 'x86_64-unknown-linux-gnu' somehow, > but I suspect others have better ideas? I=E2=80=99m not sure how to do this. Having, say, an x86_64avx-linux system type (not triplet) would be impractical because it would be entirely separate from x86_64-linux (different derivations). Ideally, software for which using these CPU extensions makes a significant difference would do what glibc does, which is to provide several implementations of the relevant functions (one for SSE2, one for AVX, etc.) and have the right one be selected at load time via an IFUNC or similar mechanism. Thanks, Ludo=E2=80=99.