From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: Re: fftw runtime cpu detection Date: Fri, 6 Apr 2018 10:08:46 -0500 Message-ID: <20180406150846.GV105827@pe06.us.cray.com> References: <20180405221329.GT105827@pe06.us.cray.com> <87po3cahxw.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f4SzB-00076Y-7u for guix-devel@gnu.org; Fri, 06 Apr 2018 11:09:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f4Sz7-0006AF-DX for guix-devel@gnu.org; Fri, 06 Apr 2018 11:09:05 -0400 Received: from esa2.cray.iphmx.com ([68.232.143.164]:46975) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1f4Sz7-00066V-0k for guix-devel@gnu.org; Fri, 06 Apr 2018 11:09:01 -0400 Content-Disposition: inline In-Reply-To: <87po3cahxw.fsf@gmail.com> 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: Chris Marusich Cc: guix-devel@gnu.org On Fri, Apr 06, 2018 at 12:54:19AM -0700, Chris Marusich wrote: > Eric Bavier writes: > > > I recently discovered that the FFTW library can do runtime cpu > > detection. > > Cool! I'm not familiar with this library, but the patch seems pretty > reasonable to me. Thanks for looking at it. > > In order to do this, the package needs to be configured to build SIMD > > "codelets", like how our 'fftw-avx' currently does. Then, based on > > the instruction support detected at runtime, make those kernels > > available to the fftw "planner" for execution. > > So, if we choose the right configure flags at build time (for the given > architecture), then at runtime, the software will detect the CPU and > either perform better or make more features available. Is that right? That's the idea, yes. The simd kernels will execute if the cpu supports them and the fftw planner finds they are faster in practice than other kernels. > > I see you added the "--enable-sse" configure flag, and it not present > before. Why did you add it? > In the documentation, I had seen it listed as the simd flag for single-precision. But now I see a comment in configure.ac that says the --enable-sse2 flag Does The Right Thing when --enable-float is given, so it can be left out. Thanks for checking! -- Eric Bavier, Scientific Libraries, Cray Inc.