You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Parallelization along K-dimension (Parallel Reduction) for GEMM with small M/N and large K #5629
I noticed that zgemm (and other GEMM functions) falls back to single-threaded execution when M and N are small (e.g., 32) but K is extremely large (e.g., 1,000,000).
On my many-core system, this leaves most cores idle. Given the large K size, parallelizing the K-loop (via parallel reduction) should theoretically offer significant speedup. I perform the matrix partitioning (of k) externally, and then use multithreading to call zgemm, but the performance is only average.
Questions:
Does OpenBLAS currently support threading along the K-dimension for this shape?
If not, are there any plans to implement parallel reduction for large K?
MKL performs quite well with these types of tall and thin matrices (m and n are small, k is large), but OpenBLAS almost degrades to vectorized computation. 🥲
The context of this problem is large-scale physical simulation programs, where OpenBLAS (zgemm) is used to compute the MGS process for block-GMRES.
Activity
seulchanson commentedon Jan 28, 2026
MKL performs quite well with these types of tall and thin matrices (m and n are small, k is large), but OpenBLAS almost degrades to vectorized computation. 🥲
The context of this problem is large-scale physical simulation programs, where OpenBLAS (zgemm) is used to compute the MGS process for block-GMRES.
ChipKerchner commentedon Mar 31, 2026
Parallelizing K can cause epsilon differences dependent on number of threads.