Does SGEMM use more than one thread?

Open discussion regarding features, bugs, issues, vendors, etc.

Does SGEMM use more than one thread?

Postby andrefaraujo » Thu Jan 14, 2016 11:54 pm

Hello,

Does the SGEMM function from the BLAS reference library (libblas.so.3gf on Ubuntu) use multiple threads?

The context in more detail: I am timing two algorithms which make use of SGEMM for matrix multiplications. In both cases, a matrix multiplication is performed, but in one case the matrix is much larger than in the other case. I would like to be sure that in both cases SGEMM is only using one thread, so that the timing I get from each is comparable and reflect their complexities. My guess is that SGEMM executes one thread only, but I am not sure. When I run the program on gdb (I am using C) and put a breakpoint on the line that calls SGEMM, I systematically see two threads being created, independently of the size of the data fed to it (but my current guess is that these two threads are not used to parallelize computation, but rather due to some interfacing between Fortran and C, not sure). I looked at the original "sgemm.f" code (from http://archive.ubuntu.com/ubuntu/pool/main/b/blas/blas_1.2.20110419.orig.tar.gz) in Fortran (which reads easily even if I do not know Fortran) and I found no indication that it would be doing multithreading. So, my current hypothesis is that both algorithms are indeed using only one thread when SGEMM is called, but I am not 100% sure.

Could someone please help me with that?
andrefaraujo
 
Posts: 2
Joined: Thu Jan 14, 2016 11:49 pm

Return to User Discussion

Who is online

Users browsing this forum: No registered users and 2 guests