octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #57110] `version -blas` reports "unknown or re


From: Andrew Janke
Subject: [Octave-bug-tracker] [bug #57110] `version -blas` reports "unknown or reference BLAS"
Date: Wed, 23 Oct 2019 20:11:15 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:69.0) Gecko/20100101 Firefox/69.0

Follow-up Comment #3, bug #57110 (project octave):

Aw, crap. Our whole version detection mechanism here might have a problem: it
checks for - (sorry if I got this wrong, I'm no linker expert) - the presence
of certain linked BLAS implementation DLLs and distinctive functions within
them. As it stands now, this linkage happens at compile time, when Octave is
built against a particular BLAS implementation.

Interposing a different BLAS DLL using LD_PRELOAD (or DYLD_INSERT_LIBRARIES on
macOS) will change the BLAS implementation that actually gets loaded and
called for work, but not undo any previous compile-time linkage, so the probes
for other BLAS libraries will still succeed, because some of them check for
idiosyncratic aspects of those BLAS implementation libraries, which are not
part of the BLAS standard interface, and thus will not be masked by run-time
DLL interposition.

So in your case, you interposed the Reference Implementation DLL, masking the
build-time-linked OpenBLAS implementation, and that's what was called to do
the work. But the OpenBLAS implementation was still linked, including the
distinctive implementation-specific `openblas_get_config` function. So when
lo-sysinfo's blas_version found openblas_get_config linked, it decided that
you're just running OpenBLAS, queried `openblas_get_config` for the OpenBLAS
metadata, and didn't know about the RI DLL interposition.

And this is not a cosmetic issue: as you demonstrate, the BLAS you're using
significantly affects performance. And I'm working on this problem in the
first place because Apple Accelerate/vecLib has some issues that cause Octave
test failures or odd numeric results.

It is a bummer that the original designers of the BLAS library didn't include
a standard blas_info() function that let you query the implementation
metadata. Oh well, live and learn; BLAS was an innovator and library/API
design has evolved a lot since then.

I do not know enough about linkers and loaders to know how to do a probe that
can detect run-time interposition.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57110>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]