[Numpy-discussion] Windows, blas, atlas and dlls

2013-02-18 Thread Sergio Callegari
Hi, I have a project that includes a cython script which in turn does some direct access to a couple of cblas functions. This is necessary, since some matrix multiplications need to be done inside a tight loop that gets called thousands of times. Speedup wrt calling scipy.linalg.blas.cblas

Re: [Numpy-discussion] Windows, blas, atlas and dlls

2013-02-18 Thread rif
I have no answer to the question, but I was curious as to why directly calling the cblas would be 10x-20x slower in the first place. That seems surprising, although I'm just learning about python numerics. On Mon, Feb 18, 2013 at 7:38 AM, Sergio Callegari sergio.calleg...@gmail.com wrote:

Re: [Numpy-discussion] Windows, blas, atlas and dlls

2013-02-18 Thread V. Armando Solé
Hi Sergio, I faced a similar problem one year ago. I solved it writing a C function receiving a pointer to the relevant linear algebra routine I needed. Numpy does not offers the direct access to the underlying library functions, but scipy does it: from scipy.linalg.blas import fblas dgemm =

Re: [Numpy-discussion] Windows, blas, atlas and dlls

2013-02-18 Thread Dag Sverre Seljebotn
On 02/18/2013 05:26 PM, rif wrote: I have no answer to the question, but I was curious as to why directly calling the cblas would be 10x-20x slower in the first place. That seems surprising, although I'm just learning about python numerics. The statement was that directly (on the Cython

Re: [Numpy-discussion] Windows, blas, atlas and dlls

2013-02-18 Thread Dag Sverre Seljebotn
On 02/18/2013 05:28 PM, Dag Sverre Seljebotn wrote: On 02/18/2013 05:26 PM, rif wrote: I have no answer to the question, but I was curious as to why directly calling the cblas would be 10x-20x slower in The statement was that directly (on the Cython level) calling cblas is 10x-20x slower than

Re: [Numpy-discussion] Windows, blas, atlas and dlls

2013-02-18 Thread rif
But I'd hope that the overhead for going through the wrappers is constant, rather than dependent on the size, so that for large matrices you'd get essentially equivalent performance? On Mon, Feb 18, 2013 at 8:28 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: On 02/18/2013 05:26

Re: [Numpy-discussion] Windows, blas, atlas and dlls

2013-02-18 Thread Charles R Harris
On Mon, Feb 18, 2013 at 9:28 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: On 02/18/2013 05:26 PM, rif wrote: I have no answer to the question, but I was curious as to why directly calling the cblas would be 10x-20x slower in the first place. That seems surprising, although

Re: [Numpy-discussion] Windows, blas, atlas and dlls

2013-02-18 Thread Dag Sverre Seljebotn
On 02/18/2013 05:29 PM, rif wrote: But I'd hope that the overhead for going through the wrappers is constant, rather than dependent on the size, so that for large matrices you'd get essentially equivalent performance? That is correct. Ah, so then the quality of the BLAS matters much less in

Re: [Numpy-discussion] Windows, blas, atlas and dlls

2013-02-18 Thread Pauli Virtanen
18.02.2013 19:20, Dag Sverre Seljebotn kirjoitti: On 02/18/2013 05:29 PM, rif wrote: But I'd hope that the overhead for going through the wrappers is constant, rather than dependent on the size, so that for large matrices you'd get essentially equivalent performance? That is correct. Ah,

Re: [Numpy-discussion] Windows, blas, atlas and dlls

2013-02-18 Thread Dag Sverre Seljebotn
On 02/18/2013 06:48 PM, Pauli Virtanen wrote: 18.02.2013 19:20, Dag Sverre Seljebotn kirjoitti: On 02/18/2013 05:29 PM, rif wrote: But I'd hope that the overhead for going through the wrappers is constant, rather than dependent on the size, so that for large matrices you'd get essentially

Re: [Numpy-discussion] Windows, blas, atlas and dlls

2013-02-18 Thread Pauli Virtanen
18.02.2013 20:41, Dag Sverre Seljebotn kirjoitti: [clip] I think there should be a new project, pylapack or similar, for this, outside of NumPy and SciPy. NumPy and SciPy could try to import it, and if found, fetch a function pointer table. (If not found, just stay with what has been

Re: [Numpy-discussion] Windows, blas, atlas and dlls

2013-02-18 Thread Dag Sverre Seljebotn
On 02/18/2013 09:23 PM, Pauli Virtanen wrote: 18.02.2013 20:41, Dag Sverre Seljebotn kirjoitti: [clip] I think there should be a new project, pylapack or similar, for this, outside of NumPy and SciPy. NumPy and SciPy could try to import it, and if found, fetch a function pointer table. (If

Re: [Numpy-discussion] Windows, blas, atlas and dlls

2013-02-18 Thread V. Armando Sole
On 18.02.2013 21:23, Pauli Virtanen wrote: 18.02.2013 20:41, Dag Sverre Seljebotn kirjoitti: [clip] I think there should be a new project, pylapack or similar, for this, outside of NumPy and SciPy. NumPy and SciPy could try to import it, and if found, fetch a function pointer table. (If

Re: [Numpy-discussion] Windows, blas, atlas and dlls

2013-02-18 Thread Pauli Virtanen
18.02.2013 23:29, V. Armando Sole kirjoitti: [clip] I find Dag's approach more appealing. SciPy can be problematic (windows 64-bit) and if one could offer access to the linear algebra functions without needing SciPy I would certainly prefer it. Well, the two approaches are not exclusive.

Re: [Numpy-discussion] Windows, blas, atlas and dlls

2013-02-18 Thread V. Armando Sole
On 18.02.2013 22:47, Pauli Virtanen wrote: 18.02.2013 23:29, V. Armando Sole kirjoitti: [clip] I find Dag's approach more appealing. SciPy can be problematic (windows 64-bit) and if one could offer access to the linear algebra functions without needing SciPy I would certainly prefer