cuda - cuSPARSE dense times sparse -


i need calculate following matrix math:
d * a
d dense, , sparse, in csc format.
cusparse allows multiplying sparse * dense, sparse matrix in csr format.

following related question, can "convert" csc csr transposing a.
can calculate (a^t * d^t)^t, can handle getting result transposed.
in method can avoid "transposing" a, because csr^t csc.

problem cusparse doesn't support transposing d in operation, have tranpose beforehand, or convert csr, total waste, very dense.

is there workaround?
thanks.

i found workaround.
changed memory accesses d in entire code.
if d mxn matrix, , used access d[j * m + i], i'm accessing d[i * n + j], meaning made rows-major instead of columns-major.
cusparse expectes matrices in column-major format, , because rows-major transposed columns-major, can pass d cusparse functions fake transpose without need make transpose.


Comments