Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-22 Thread Sturla Molden
Robert Kern skrev: > I would be delighted to see a reference to one that refers to a high > level language's API as SIMD. Please point one out to me. It's > certainly not any of the ones I have available to me. > > Numerical Receipes in Fortran 90, page 964 and 985-986, describes the syntax of

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-22 Thread Robert Kern
On Thu, Oct 22, 2009 at 06:20, Dag Sverre Seljebotn wrote: > Robert Kern wrote: >> On Wed, Oct 21, 2009 at 22:32, Mathieu Blondel wrote: >> >>> On Thu, Oct 22, 2009 at 11:31 AM, Sturla Molden wrote: >>> Mathieu Blondel skrev: > Hello, > > About one year ago, a high-level, o

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-22 Thread Robert Kern
On Thu, Oct 22, 2009 at 02:35, Sturla Molden wrote: > Robert Kern skrev: >> No, I think you're right. Using "SIMD" to refer to numpy-like >> operations is an abuse of the term not supported by any outside >> community that I am aware of. Everyone else uses "SIMD" to describe >> hardware instructio

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-22 Thread Robert Ferrell
On Oct 22, 2009, at 1:35 AM, Sturla Molden wrote: > Robert Kern skrev: >> No, I think you're right. Using "SIMD" to refer to numpy-like >> operations is an abuse of the term not supported by any outside >> community that I am aware of. Everyone else uses "SIMD" to describe >> hardware instruction

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-22 Thread Dag Sverre Seljebotn
Robert Kern wrote: > On Wed, Oct 21, 2009 at 22:32, Mathieu Blondel wrote: > >> On Thu, Oct 22, 2009 at 11:31 AM, Sturla Molden wrote: >> >>> Mathieu Blondel skrev: >>> Hello, About one year ago, a high-level, objected-oriented SIMD API was added to Mono. For ex

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-22 Thread Gregor Thalhammer
2009/10/21 Neal Becker > ... > > I once wrote a module that replaces the built in transcendental > > functions of numpy by optimized versions from Intels vector math > > library. If someone is interested, I can publish it. In my experience it > > was of little use since real world problems are li

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-22 Thread Sturla Molden
Mathieu Blondel skrev: > As I wrote earlier in this thread, I confused Cython and CPython. PN > was suggesting to include Numpy in the CPython distribution (not > Cython). The reason why was also given earlier. > > First, that would currently not be possible, as NumPy does not support Py3k. Se

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-22 Thread Mathieu Blondel
On Thu, Oct 22, 2009 at 5:05 PM, Sturla Molden wrote: > Mathieu Blondel skrev: > The PEP 3118 buffer syntax in Cython can be used to port NumPy to Py3k, > replacing the current C source. That might be what Norvig meant if he > suggested merging NumPy into Cython. As I wrote earlier in this threa

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-22 Thread Sturla Molden
Mathieu Blondel skrev: > Peter Norvig suggested to merge Numpy into Cython but he didn't > mention SIMD as the reason (this one is from me). I don't know what Norvig said or meant. However: There is NumPy support in Cython. Cython has a general syntax applicable to any PEP 3118 buffer. (As Num

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-22 Thread Sturla Molden
Matthieu Brucher skrev: > I agree with Sturla, for instance nVidia GPUs do SIMD computations > with blocs of 16 values at a time, but the hardware behind can't > compute on so much data at a time. It's SIMD from our point of view, > just like Numpy does ;) > > A computer with a CPU and a GPU is

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-22 Thread Matthieu Brucher
>> OK, I should have said "Object-oriented SIMD API that is implemented >> using hardware SIMD instructions". > > No, I think you're right. Using "SIMD" to refer to numpy-like > operations is an abuse of the term not supported by any outside > community that I am aware of. Everyone else uses "SIMD"

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-22 Thread Sturla Molden
Robert Kern skrev: > No, I think you're right. Using "SIMD" to refer to numpy-like > operations is an abuse of the term not supported by any outside > community that I am aware of. Everyone else uses "SIMD" to describe > hardware instructions, not the application of a single syntactical > element o

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Robert Kern
On Wed, Oct 21, 2009 at 22:32, Mathieu Blondel wrote: > On Thu, Oct 22, 2009 at 11:31 AM, Sturla Molden wrote: >> Mathieu Blondel skrev: >>> Hello, >>> >>> About one year ago, a high-level, objected-oriented SIMD API was added >>> to Mono. For example, there is a class Vector4f for vectors of 4 >

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Mathieu Blondel
On Thu, Oct 22, 2009 at 11:31 AM, Sturla Molden wrote: > Mathieu Blondel skrev: >> Hello, >> >> About one year ago, a high-level, objected-oriented SIMD API was added >> to Mono. For example, there is a class Vector4f for vectors of 4 >> floats and this class implements methods such as basic opera

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Sturla Molden
Mathieu Blondel skrev: > Hello, > > About one year ago, a high-level, objected-oriented SIMD API was added > to Mono. For example, there is a class Vector4f for vectors of 4 > floats and this class implements methods such as basic operators, > bitwise operators, comparison operators, min, max, sqrt

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread David Cournapeau
On Wed, Oct 21, 2009 at 10:14 PM, Pauli Virtanen wrote: > > This type of project could probably also be started outside Numpy, and > just monkey-patch the Numpy routines on import. I think I would prefer this approach as a first shot. I will look into adding a small C library + wrapper in python

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Andrew Friedley
sigh; yet another email dropped by the list. David Warde-Farley wrote: > On 21-Oct-09, at 9:14 AM, Pauli Virtanen wrote: > >> Since these are ufuncs, I suppose the SSE implementations could just >> be >> put in a separate module, which is always compiled. Before importing >> the >> module, we

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread David Warde-Farley
On 21-Oct-09, at 9:14 AM, Pauli Virtanen wrote: > Since these are ufuncs, I suppose the SSE implementations could just > be > put in a separate module, which is always compiled. Before importing > the > module, we could simply check from Python side that the CPU supports > the > necessary i

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Neal Becker
... > I once wrote a module that replaces the built in transcendental > functions of numpy by optimized versions from Intels vector math > library. If someone is interested, I can publish it. In my experience it > was of little use since real world problems are limited by memory > bandwidth. Theref

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Ryan May
On Wed, Oct 21, 2009 at 1:23 PM, Ryan May wrote: > On Wed, Oct 21, 2009 at 11:38 AM, Gregor Thalhammer > wrote: >> I once wrote a module that replaces the built in transcendental >> functions of numpy by optimized versions from Intels vector math >> library. If someone is interested, I can publis

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Ryan May
On Wed, Oct 21, 2009 at 11:38 AM, Gregor Thalhammer wrote: > I once wrote a module that replaces the built in transcendental > functions of numpy by optimized versions from Intels vector math > library. If someone is interested, I can publish it. In my experience it > was of little use since real

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Gregor Thalhammer
Pauli Virtanen schrieb: > Wed, 21 Oct 2009 14:47:02 +0200, Francesc Alted wrote: > [clip] > >>> Do you have any interest in adding SIMD to some core numpy >>> (transcendental functions). If so, I would try to go back to the >>> problem of runtime SSE detection and loading of optimized shared >>> li

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread René Dudfield
On Wed, Oct 21, 2009 at 2:14 PM, Pauli Virtanen > wrote: > Wed, 21 Oct 2009 14:47:02 +0200, Francesc Alted wrote: > [clip] > >> Do you have any interest in adding SIMD to some core numpy > >> (transcendental functions). If so, I would try to go back to the > >> problem of runtime SSE detection an

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Pauli Virtanen
Wed, 21 Oct 2009 14:47:02 +0200, Francesc Alted wrote: [clip] >> Do you have any interest in adding SIMD to some core numpy >> (transcendental functions). If so, I would try to go back to the >> problem of runtime SSE detection and loading of optimized shared >> library in a cross-platform way - th

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Francesc Alted
A Wednesday 21 October 2009 14:27:46 David Cournapeau escrigué: > > This is because numpy is a package that works mainly with arrays in an > > element-wise way, and in this scenario, the time to transmit data to CPU > > dominates, by and large, over the time to perform operations. > > Is it general

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Matthieu Brucher
> Is it general, or just for simple operations in numpy and ufunc ? I > remember that for music softwares, SIMD used to matter a lot, even for > simple bus mixing (which is basically a ax+by with a, b scalars and x > y the input arrays). Indeed, it shouldn't :| I think the main reason might not be

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread David Cournapeau
On Wed, Oct 21, 2009 at 6:12 PM, Francesc Alted wrote: > A Wednesday 21 October 2009 07:44:39 Mathieu Blondel escrigué: >> Hello, >> >> About one year ago, a high-level, objected-oriented SIMD API was added >> to Mono. For example, there is a class Vector4f for vectors of 4 >> floats and this clas

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Francesc Alted
A Wednesday 21 October 2009 07:44:39 Mathieu Blondel escrigué: > Hello, > > About one year ago, a high-level, objected-oriented SIMD API was added > to Mono. For example, there is a class Vector4f for vectors of 4 > floats and this class implements methods such as basic operators, > bitwise operato

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Mathieu Blondel
On Wed, Oct 21, 2009 at 5:23 PM, David Cournapeau wrote: > Ah, I think you are mistaken, then - he referred to merging numpy and > scipy into python during his talk, not cython. Oh, I meant to say CPython (the default implementation of Python), not Cython. I didn't realize that they were differe

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread David Cournapeau
Mathieu Blondel wrote: > He went on to say that he talked about > it with Guido and apparently the main barrier was the release cycle. > Please check the video as I'm telling you that from memory. > Ah, I think you are mistaken, then - he referred to merging numpy and scipy into python during h

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Mathieu Blondel
On Wed, Oct 21, 2009 at 5:05 PM, David Cournapeau wrote: > Mathieu Blondel wrote: >> I saw the video of Peter Norvig at the last Scipy conference who was >> suggesting to merge Numpy into Cython. The SIMD API would be an >> argument in favor of this too because of the possible interactions >> betw

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread David Cournapeau
Mathieu Blondel wrote: > I saw the video of Peter Norvig at the last Scipy conference who was > suggesting to merge Numpy into Cython. The SIMD API would be an > argument in favor of this too because of the possible interactions > between such a SIMD API and an array API. > Hm, I don't remember

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Pauli Virtanen
Wed, 21 Oct 2009 16:48:22 +0900, Mathieu Blondel wrote: [clip] > My original idea was to write the code in C with Intel/Alvitec/Neon > intrinsics and have this code binded to be able to call it from Python. > So the SIMD code would be compiled already, ready to be called from > Python. Like you sai

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Mathieu Blondel
Hi David, On Wed, Oct 21, 2009 at 3:56 PM, David Cournapeau wrote: > I am not sure how this could be applied to numpy case ? From what I can > understand, this cannot be directly applied to python: the described > changes are vm changes, and we cannot do anything at python vm level (I > would gue

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Mathieu Blondel
> The licenses look all hodge-podge: [...] > However, if the good stuff is in the class libraries, that looks OK. But > that still leaves it in C#, no? I was mentioning Mono just to show that "this has been done" and also their API reference can serve as inspiration to design Numpy's own API.

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread David Cournapeau
Hi Mathieu, Mathieu Blondel wrote: > Hello, > > About one year ago, a high-level, objected-oriented SIMD API was added > to Mono. For example, there is a class Vector4f for vectors of 4 > floats and this class implements methods such as basic operators, > bitwise operators, comparison operators, m

Re: [Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-21 Thread Charles R Harris
On Tue, Oct 20, 2009 at 11:44 PM, Mathieu Blondel wrote: > Hello, > > About one year ago, a high-level, objected-oriented SIMD API was added > to Mono. For example, there is a class Vector4f for vectors of 4 > floats and this class implements methods such as basic operators, > bitwise operators, c

[Numpy-discussion] Objected-oriented SIMD API for Numpy

2009-10-20 Thread Mathieu Blondel
Hello, About one year ago, a high-level, objected-oriented SIMD API was added to Mono. For example, there is a class Vector4f for vectors of 4 floats and this class implements methods such as basic operators, bitwise operators, comparison operators, min, max, sqrt, shuffle directly using SIMD oper