all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dave Love <fx@gnu.org>
To: "Ludovic Courtès" <ludovic.courtes@inria.fr>
Cc: Guix-devel <guix-devel@gnu.org>, Eric Bavier <bavier@cray.com>,
	Federico Beffa <beffa@ieee.org>
Subject: Re: OpenBLAS and performance
Date: Fri, 22 Dec 2017 12:45:01 +0000	[thread overview]
Message-ID: <87vagz0w4y.fsf@albion.it.manchester.ac.uk> (raw)
In-Reply-To: <87ind05dwm.fsf@gnu.org> ("Ludovic \=\?iso-8859-1\?Q\?Court\=E8s\?\= \=\?iso-8859-1\?Q\?\=22's\?\= message of "Thu, 21 Dec 2017 15:55:21 +0100")

Ludovic Courtès <ludovic.courtes@inria.fr> writes:

> Hello,
>
> Dave Love <fx@gnu.org> skribis:
>
>> Fedora sensibly builds separately-named libraries for different flavours
>> <https://apps.fedoraproject.org/packages/openblas/sources/>, but I'd
>> argue also for threaded versions being available with the generic soname
>> in librray sub-directories.  There's some discussion and measurements
>> (apologies if I've referenced it before) at
>> <https://loveshack.fedorapeople.org/blas-subversion.html>
>
> I like the idea of an ‘update-alternative’ kind of approach for
> interchangeable implementations.

/etc/ld.so.conf.d normally provides a clean way to flip the default, but
that isn't available in Guix as far as I remember.

> Unfortunately my understanding is that implementations aren’t entirely
> interchangeable, especially for LAPACK (not sure about BLAS), because
> BLIS, OpenBLAS, etc. implement slightly different subsets of netlib
> LAPACK, AIUI.

LAPACK may add new routines, but you can always link with the vanilla
Netlib version, and openblas is currently only one release behind.  The
LAPACK release notes I've seen aren't very helpful for following that.
The important requirement is fast GEMM from the optimized BLAS.  I
thought BLIS just provided the BLAS layer, which is quite stable, isn't
it?

> Packages also often check for specific implementations in
> their configure/CMakeLists.txt rather than just for “BLAS” or “LAPACK”.

It doesn't matter what they're built against when you dynamically load a
compatible version.  (You'd hope a build system would be able to find
arbitrary BLAS but I'm too familiar with cmake pain.)  The openblas
compatibility hack basically just worked on an RHEL6 cluster when I
maintained it.

> FlexiBLAS, which Eric mentioned, looks interesting because it’s designed
> specifically for that purpose.  Perhaps worth giving it a try.

I see it works by wrapping everything, which I wanted to avoid.  Also
it's GPL, which restricts its use.  What's the advantage over just
having implementations which are directly interchangeable at load time?

> Besides, it would be good to have a BLAS/LAPACK policy in Guix.  We
> should at least agree (1) on default BLAS/LAPACK implementations, (2)
> possibly on a naming scheme for variants based on a different
> implementation.

Yes, but the issue is wider than just linear algebra.  It seems to
reflect tension between Guix' approach (as I understand it) and the late
binding I expect to use.  There are potentially other libraries with
similar micro-architecture-specific issues, and the related one of
profiling/debugging versions.  I don't know how much of a real problem
there really is, and it would be good to know if someone has addressed
this.

It's a reason I'm currently not convinced about the trades-off with
Guix, and don't go along with the "reproducibility" mantra.  Obviously
I'm not writing Guix off, though, and I hope the discussion is useful.

> For #1 we should probably favor implementations that support run-time
> implementation selection such as OpenBLAS (or the coming BLIS release).
>
> Thoughts?
>
> Ludo’.

Yes, but even with dynamic dispatch you need to account for situations
like we currently have on x86_64 with OB not supporting the latest
micro-architecture, and it only works on x86 with OB.  You may also want
to avoid overhead -- see FFTW's advice for packaging.  Oh for SIMD
hwcaps...

  reply	other threads:[~2017-12-22 12:45 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-19 10:49 OpenBLAS and performance Pjotr Prins
2017-12-19 17:12 ` Ludovic Courtès
2017-12-20 11:50 ` Dave Love
2017-12-20 14:48   ` Dave Love
2017-12-20 15:06     ` Ricardo Wurmus
2017-12-22 12:24       ` Dave Love
2017-12-20 17:22     ` Pjotr Prins
2017-12-20 18:15       ` Ricardo Wurmus
2017-12-20 19:28         ` Pjotr Prins
2017-12-20 20:00           ` Ricardo Wurmus
2017-12-20 20:32             ` Pjotr Prins
2017-12-20 19:02               ` Eric Bavier
2017-12-21 16:38                 ` Dave Love
2017-12-20 23:02               ` Ricardo Wurmus
2017-12-21 10:36                 ` Pjotr Prins
2017-12-21 14:43           ` Ludovic Courtès
2017-12-22 14:35           ` Dave Love
2017-12-21 16:17         ` Dave Love
2017-12-21 16:46           ` Ricardo Wurmus
2017-12-21 14:55   ` Ludovic Courtès
2017-12-22 12:45     ` Dave Love [this message]
2017-12-22 15:10       ` Ludovic Courtès
2017-12-22 16:08         ` Pjotr Prins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vagz0w4y.fsf@albion.it.manchester.ac.uk \
    --to=fx@gnu.org \
    --cc=bavier@cray.com \
    --cc=beffa@ieee.org \
    --cc=guix-devel@gnu.org \
    --cc=ludovic.courtes@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.