[Numpy-discussion] Fast threading solution thoughts
Matthieu Brucher
matthieu.brucher@gmail....
Thu Feb 12 07:55:20 CST 2009
2009/2/12 Gregor Thalhammer <gregor.thalhammer@gmail.com>:
> Brian Granger schrieb:
>>> I am curious: would you know what would be different in numpy's case
>>> compared to matlab array model concerning locks ? Matlab, up to
>>> recently, only spreads BLAS/LAPACK on multi-cores, but since matlab 7.3
>>> (or 7.4), it also uses multicore for mathematical functions (cos,
>>> etc...). So at least in matlab's model, it looks like it can be useful.
>>>
>>
>> Good point. Is it possible to tell what array size it switches over
>> to using multiple threads? Also, do you happen to iknow how Matlab is
>> doing this?
>>
>>
> Recent Matlab versions use Intels Math Kernel Library, which performs
> automatic multi-threading - also for mathematical functions like sin
> etc, but not for addition, multiplication etc. It seems to me Matlab
> itself does not take care of multi-threading. On
> http://www.intel.com/software/products/mkl/data/vml/functions/_listfunc.html
> you can have a look at the performance data of the MKL vectorized math
> functions. Around a vector length between 100-1000, depending on which
> function, precision, cpu architecture, they switch to multi-threading.
For BLAS level 3, the MKL is parallelized (so matrix multiplication is).
Matthieu
--
Information System Engineer, Ph.D.
Website: http://matthieu-brucher.developpez.com/
Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn: http://www.linkedin.com/in/matthieubrucher
More information about the Numpy-discussion
mailing list