Re: Accessing cblas in pythonxy

49 views
Skip to first unread message

Gabi Davar

unread,
Feb 19, 2013, 4:57:25 AM2/19/13
to pyth...@googlegroups.com
Sergio Hi,

Python(x,y) ships with the official SciPy package which is linked statically against ATLAS built for SSE3. The BLAS libraries option for Win32 is pretty grim. The best is probably Intel MKL - strongly suggested if you have access. The alternative is to build ATLAS from source http://www.scipy.org/Installing_SciPy/Windows#head-711101b83618cd49bcd3283dc5eea28ceb734116 .

Unfortunately there is already much duplication between the various packages in Python(x, y) and it's something the next release will tackle.

-gabi


On Saturday, February 16, 2013 6:32:37 PM UTC+2, Sergio Callegari wrote:
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 routines is 10x to 20x.

Now, all this is very nice on linux where the setup script can assure that the cython code gets linked with the atlas dynamic library, which is the same library that numpy and scipy link to on this platform.

However, I now have trouble in providing easy ways to use my project in windows. Python(x,y) for windows 32 ships cython (OK) and the mingw compiler (OK). Furthermore numpy and scipy appear to use atlas as their blas implementation (at least this is what one can guess by looking at the strings in _dotblas.pyd). However, there is no stand alone atlas .lib and .dll file. I do not have tons of experience in the windows platform, but I guess that atlas is statically linked in numpy and scipy. Is this the case?

Missing a standalone set of atlas libraries, my current solution is to ship with my code a pre-built atlas from  http://www.netlib.org/atlas/archives/windows/ but I would really not like to duplicate something that is already in python(x,y).

Any clue?  Could python(x,y) move to providing an atlas implementation that is directly usable from cython or when otherwise extending python from C?

Many thanks for any advice!
Reply all
Reply to author
Forward
0 new messages