clMathLibraries / clSPARSE

a software library containing Sparse functions written in OpenCL
Apache License 2.0
173 stars 61 forks source link

Probable bug in clsparseScsrmm() with cldenseMatrix #208

Open UsherWang opened 7 years ago

UsherWang commented 7 years ago

Hi there,

I was testing clsparse on Nvidia gtx 690 because I want to rewrite my cuda code into opencl for it support much more platforms. While I was testing clsparseScsrmm(), the sparse-dense matrix multiply routine, I found that no matter what major the dense matrix is set(cldenseMatrix mat; mat.major = rowMajor; or mat.major = columnMajor; ), clsparseScsrmm() always reads and writes data in row major. For more specific situation, when I set major to rowMajor I get correct result, otherwise I get wrong result. Then I tested the columnMajor and find it reads and writes data in rowMajor.

Thank you guys very much for helping me with this.

Usher

tingxingdong commented 7 years ago

I agree. The column major is widely used and the in-fact standard. rowMajor is not. column major should be supported in the first place.

zhouhuanxiang commented 6 years ago

Same problem. The reason is that the csrmm() function in clsparse-csrmm.hpp simply discards memory layout infomation. And it seems that authors won't fix the problem. Disappointed!