Page 1 of 1

Bugs in magma_<t>cuspmm (magma 1.6)

Posted: Tue Nov 18, 2014 5:18 am
by Noran
Hi @ all,
i've used the function named in the topic (magma_<t>cuspmm - magma/sparse-iter/src/magma_scuspmm.cpp). And i think there is a little Bug (look at the numbers of rows and cols from A and B):
Line 124:

Code: Select all

cusparseXcsrgemmNnz(handle, CUSPARSE_OPERATION_NON_TRANSPOSE, 
                                        CUSPARSE_OPERATION_NON_TRANSPOSE, 
                                        A.num_rows, A.num_rows, A.num_rows, 
                                        descrA, A.nnz, A.drow, A.dcol,
                                        descrB, B.nnz, B.drow, B.dcol,
                                        descrC, C.drow, nnzTotalDevHostPtr );
shouldn't it be the follwing (see http://docs.nvidia.com/cuda/cusparse/in ... gt-csrgemm):

Code: Select all

cusparseXcsrgemmNnz(handle, CUSPARSE_OPERATION_NON_TRANSPOSE, 
                                        CUSPARSE_OPERATION_NON_TRANSPOSE, 
                                        A.num_rows, B.num_cols, A.num_cols, 
                                        descrA, A.nnz, A.drow, A.dcol,
                                        descrB, B.nnz, B.drow, B.dcol,
                                        descrC, C.drow, nnzTotalDevHostPtr );
same in line 148:

Code: Select all

cusparseScsrgemm(handle, CUSPARSE_OPERATION_NON_TRANSPOSE, 
                                        CUSPARSE_OPERATION_NON_TRANSPOSE, 
                            A.num_rows, A.num_rows, A.num_rows,
                            descrA, A.nnz,
                            A.dval, A.drow, A.dcol,
                            descrB, B.nnz,
                            B.dval, B.drow, B.dcol,
                            descrC,
                            C.dval, C.drow, C.dcol);
substitute with the following (see http://docs.nvidia.com/cuda/cusparse/in ... gt-csrgemm):

Code: Select all

cusparseScsrgemm(handle, CUSPARSE_OPERATION_NON_TRANSPOSE, 
                                        CUSPARSE_OPERATION_NON_TRANSPOSE, 
                            A.num_rows, B.num_cols, A.num_cols,
                            descrA, A.nnz,
                            A.dval, A.drow, A.dcol,
                            descrB, B.nnz,
                            B.dval, B.drow, B.dcol,
                            descrC,
                            C.dval, C.drow, C.dcol);

Re: Bugs in magma_<t>cuspmm (magma 1.6)

Posted: Tue Nov 18, 2014 10:03 am
by hartwig anzt
Noran,

I apologize again. This happens if you typically deal with squared matrices only... sorry for that! I changed it for the next version.

Great thanks for reporting! Hartwig

Re: Bugs in magma_<t>cuspmm (magma 1.6)

Posted: Tue Nov 18, 2014 2:46 pm
by Noran
no problem Hartwig :) and you needn't to apologize. It's a little bit normal for an academic projects. And it's good that you're going on to develop :)

Greetz Noran