Open lionpeloux opened 8 years ago
Perhaps multi-threading isn't being used for MKL on Mac? Might want to check how many threads are being set and also make sure the MKL wrapper is linking to the correct version of MKL when built on Mac.
Only thing I can think of.
If it is a p/invoke problem then you could try putting your loop into C/C++ and call the MKL wrapper from there. Then there'd only be a single p/invoke call.
Hello,
I've started a simple bench. I need to do lots of vector computations for a spring-mass system. For a standard system, my algorithm will run about 1e5 iterations moving about 1e4 points (x,y,z) at each iterations.
I'm investigating how the MKL provider could speed up of my computations. I'm also investigating 2 different layouts for my data structure :
based on A Guide to Vectorization with Intel® C++ Compilers :
I've remarked, using the sample of code given bellow, that performance is very different between Mono Mac and Windows with the MKL provider.
The bench does pointwise multiplication of double vectors of size
N = 10000
.double[1000][10]
.double[10000]
.Here are the results. CPU timing is given in ns per elementary operation (= total CPU time in s x 1e9 / N).
Do you know why there's a huge difference between Mac Mono and Windows with the basic pointwise multiplication (x40) ?
Is this inherent to P/Invoke with monomac ? Is this inherent to how I build the MKL provider on OSX ?
Thanks, Lionel
Here's my code on the pointwise multiplication of 2 vectors :