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

Charles R Harris charlesr.harris at gmail.com
Tue Aug 15 14:05:34 EDT 2017


On Tue, Aug 15, 2017 at 10:26 AM, Paul <pavdev at gmx.de> wrote:

> Hi all,
>
> I recently spent some time adding python interfaces to my tensor libraries:
>   * Tensor Contraction Library (TCL): https://github.com/springer13/tcl
>   * Tensor Transposition Library (HPTT): https://github.com/springer13/
> hptt
>
> Both libraries tend to give very significant speedups over what is
> currently offered by NumPY; Speedups
> typically range from 5x - 20x w.r.t. HPTT and >>20x for TCL (see
> attached, Host: 2x Intel Haswell-EP E5-2680 v3 (24 threads)).
> Thus, I was curious if some of you would benefit from those speedups and
> if you want it to
> be integrated into NumPY.
>
> The HPTT and TCL libraries are respectively similar to numpy.transpose()
> and numpy.einsum().
>
> I welcome you to give the packages a try and see if they can help you to
> speedup some of your tensor-related operations.
>
> Finally: Which steps would be required to integrate those libraries into
> NumPY? Which problems do you anticipate?
>
>
What version of Numpy are you comparing to? Note that in 1.13 you can
enable some optimization in einsum, and the coming 1.14 makes that the
default and uses CBLAS when possible.

If you want to get it into Numpy, it would be worth checking if the
existing functions can be improved before adding new ones.

Note that Numpy transposition method just rearranges the indices, so the
advantage of actual transposition is to have better cache performance or
allow direct use of CBLAS. I assume TCL uses some tricks to do
transposition in a way that is more cache friendly?

Might check the license if your work uses code from a publication.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20170815/5c8147e0/attachment.html>


More information about the NumPy-Discussion mailing list