[Numpy-discussion] Multithreading support
Sun Feb 14 20:07:16 CST 2010
Perhaps it's my inability to properly use openmp, but when working on
scikits.image on algorithms doing per-pixel manipulation with numpy arrays
(using Cython), i saw better performance using Python threads and releasing
the GIL than I did with openmp. I found the openmp overhead to be quite
large, and for the size the images i was working with (5 MP), the overhead
wasn't worth it.
I made a post to Cython-dev about it.
On Sat, Feb 13, 2010 at 7:25 AM, René Dudfield <email@example.com> wrote:
> see: http://numcorepy.blogspot.com/
> They see a benefit when working with large arrays. Otherwise you are
> limited by memory - and the extra cores don't help with memory bandwidth.
> On Sat, Feb 13, 2010 at 2:20 PM, David Cournapeau <firstname.lastname@example.org>wrote:
>> On Sat, Feb 13, 2010 at 6:20 PM, Wolfgang Kerzendorf
>> <email@example.com> wrote:
>> > Dear all,
>> > I don't know much about parallel programming so I don't know how easy it
>> is to do that: When doing simple arrray operations like adding two arrays or
>> adding a number to the array, is numpy able to put this on multiple cores? I
>> have tried it but it doesnt seem to do that. Is there a special multithread
>> implementation of numpy.
>> Depending on your definition of simple operations, Numpy supports
>> multithreaded execution or not. For ufuncs (which is used for things
>> like adding two arrays together, etc...), there is no multithread
>> > IDL has this feature where it checks how many cores available and uses
>> them. This feature in numpy would make an already amazing package even
>> AFAIK, using multi-thread at the core level of NumPy has been tried
>> only once a few years ago, without much success (no significant
>> performance improvement). Maybe the approach was flawed in some ways.
>> Some people have suggested using OpenMP, but nobody has every produced
>> something significant AFAIK:
>> Note that Linear algebra operations can run in // depending on your
>> libraries. In particular, the dot function runs in // if your
>> blas/lapack does.
>> NumPy-Discussion mailing list
> NumPy-Discussion mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion