MKL Distributed slower!

I am using MKL to accelerate svd,
using MKL
svd will be 5-10 times faster
But it is far from enough in parallel:
Add the original svd 1.3s
using mkl will change to 0.15s

Then parallel each time 0.6s

If I declare in each process:
He will be slower than before without parallel.

Blockquote
@everywhere using MKL
From worker 2: 1.596812 seconds (24.28 k allocations: 128.745 MiB, 0.67% gc time)
From worker 3: 1.621169 seconds (24.28 k allocations: 128.745 MiB, 0.38% gc time)
From worker 4: 1.599108 seconds (24.28 k allocations: 128.745 MiB, 0.35% gc time)

1 Like

Try setting MKL_NUM_THREADS=1 and rerun all benchmarks. What do you get?

1 Like

Thank you for your answer. It is indeed caused by MKL’s automatic distribution of threads. I set too many startup processes to cause thread congestion. For this reason, I set it to MKL_NUM_THREADS=1. Although it will slow down the non-parallel speed, the parallel speed does speed up. quite a lot