Multithreaded sparse matrix multiplication in Matlab

后端 未结 3 1761
故里飘歌
故里飘歌 2021-01-11 21:21

I am performing several matrix multiplications of an NxN sparse (~1-2%) matrix, let\'s call it B, with an NxM dense matrix, let\'s call it A (where M < N). N is large, as

3条回答
  •  太阳男子
    2021-01-11 21:52

    MATLAB already uses SuiteSparse by Tim Davis for many of its operation on sparse matrices (for example see here), but neither of which I believe are multithreaded.

    Usually computations on sparse matrices are memory-bound rather than CPU-bound. So even you use a multithreaded library, I doubt you will see huge benefits in terms of performance, at least not comparable to those specialized in dense matrices...

    After all that the design of sparse matrices have different goals in mind than regular dense matrices, where efficient memory storage is often more important.


    I did a quick search online, and found a few implementations out there:

    • sparse BLAS, spBLAS, PSBLAS. For instance, Intel MKL and AMD ACML do have some support for sparse matrices
    • cuSPARSE, CUSP, VexCL, ViennaCL, etc.. that run on the GPU.

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题