[Numpy-discussion] Tensor Contraction (HPTT) and Tensor Transposition (TCL)

Chris Barker chris.barker at noaa.gov
Thu Aug 17 12:15:14 EDT 2017

On Thu, Aug 17, 2017 at 12:55 AM, Sebastian Berg <sebastian at sipsolutions.net
> wrote:

> > How would the process look like if NumPY is distributed as a
> > precompiled binary?
> Well, numpy is BSD, and the official binaries will be BSD, someone else
> could do less free binaries of course.

Indeed, if you want it to be distributed as a binary with numpy, then the
license needs to be compatible -- do you have a substantial objection to
BSD? The BSD family is pretty much the standard for Python -- Python (and
numpy) are very broadly used in proprietary software.

I doubt we can have a hard
> dependency unless it is part of the numpy source

and no reason to -- if it is a hard dependency, it HAS to be compatible
licensed, and it's a lot easier to keep the source together.

However, it _could_ be a soft dependency, like LAPACK/BLAS -- I've honestly
lost track, but numpy used come with a lapack-lite (or some such), so that
it could be compiled and work with no external LAPACK implementation -- you
wouldn't get the best performance, but it would work.

 I doubt including the source
> itself is going to happen quickly since we would first have to decide
> to actually use a modern C++ compiler (I have no idea if that is
> problematic or not).

could it be there as a conditional compilation? There is a lot of push to
support C++11 elsewhere, so a compiled-with-a-modern-compiler numpy is not
SO far off..

(for py3 anyway...)

* Use TCL if you need faster einsum(like) operations

That is, of course, the other option -- distribute it on its own or maybe
in scipy, and then users can use it as an optimization for those few core
functions where speed matters to them -- honestly, it's a pretty small
fraction of numpy code.

But it sure would be nice if it could be built in, and then folks would get
better performance without even thinkning about it.

> Just a few thoughts, did not think about details really. But yes, it is
> sounds reasonable to me to re-add support for optional dependencies
> such as fftw or your TCL. But packagers have to make use of that or I
> fear it is actually less available than a standalone python module.

true -- though I expect Anaconda / conda forge at least would be likely to
pick it up if it works well.



Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20170817/da6e96ba/attachment.html>

More information about the NumPy-Discussion mailing list