Closed baggepinnen closed 4 years ago
Interestingly, when I remove the @threads
, I see close to 100% CPU utilization, indicating that the function calls inside the previously threaded loop are themselves multithreaded.
Have you checked your BLAS num threads? A lot of the computation per iteration is in forming X'Y, which may be multithreaded if BLAS is.
Yeah, it's BLAS running multithreaded, but since that is the default, the unsuspecting user will most likely run into this problem of oversubscribing threads on both the julia side and the BLAS side.
This issue does not appear on julia v1.3-rc2 so I'm closing this issue. With 6 threads I now see about 3.5 times improvement over single threaded.
I find, while running julia v1.2 and LowRankModels v1.0.1, that the
@threads
annotation here sometimes causes massive slowdowns (3x in execution time and CPU utilization very low). My problem size ism,n,k = 200,150,10
andnthreads() == 2
. Removing the annotation makes everything much faster.