[Numpy-discussion] Introductory mail and GSoc Project "Vector math library integration"

Dp Docs sdpan21 at gmail.com
Wed Mar 11 11:51:29 EDT 2015


On Wed, Mar 11, 2015 at 7:52 PM, Sturla Molden <sturla.molden at gmail.com>
wrote:
>
​Hi sturla,
Thanks for suggestion.​

> There are several vector math libraries NumPy could use, e.g. MKL/VML,
> Apple Accelerate (vecLib), ACML, and probably others.

​Are these libraries fast enough in comparison to C maths libraries?​


> They all suffer from requiring dense arrays and specific array
> alignments, whereas NumPy arrays have very flexible strides and flexible
> alignment.
​>​
 NumPy also has ufuncs and gufuncs as a complicating factor.
​I don't think the project is supposed to modify the existing functionality
as whenever the Faster libraries ​will be unavailable, it should use the
default libraries.
>
> There are at least two ways to proceed here. One is to only use vector
> math when strides and alignment allow it.
​I didn't got it. can you explain in detail?​
​>​
 The other is to build a vector
> math library specifically for NumPy arrays and (g)ufuncs. The latter you
> will most likely not be able to do in a summer.
​I have also came up with this approach but I am confused a bit with this
approach.​
>
> You should also consider Numba
> and Numexpr. They have some support for
> vector math libraries too.
>
​I will look into this.

I think the actual problem is not "to choose which library to integrate",
it is how to integrate these libraries? as I have seen the code base and
been told the current implementation uses the c math library, Can we just
use the current  implementation and whenever it is calling ​C Maths
functions, we will replace by these above fast library functions?
Then we have to modify the Numpy library (which usually get imported for
maths operation) by using some if else conditions like first work with the
faster one  and if it is not available the look for the Default one.

Moreover, I have Another Doubt also. are we suppose to integrate just one
fast library or more than one so that if one is not available, look for the
second one and if second is not available then either go to default are
look for the third one if available?

Are we suppose to think like this: Let say "exp" is faster in sleef library
so integrate sleef library for this operation and let say "sin" is faster
in any other library, so integrate that library for sin operation? I mean,
it may be possible that different operations are faster in different
libraries So the implementation should be operation oriented or just
integrate one complete library?
​Thanks​



--
Durgesh Pandey,
IIIT-Hyderabad,India.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150311/a53d6cd9/attachment.html>


More information about the NumPy-Discussion mailing list