Bugs in magma_<t>cuspmm (magma 1.6)

Open discussion for MAGMA library (Matrix Algebra on GPU and Multicore Architectures)
Post Reply
Noran
Posts: 27
Joined: Fri Sep 26, 2014 3:47 am

Bugs in magma_<t>cuspmm (magma 1.6)

Post by Noran » Tue Nov 18, 2014 5:18 am

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);

hartwig anzt
Posts: 90
Joined: Tue Sep 02, 2014 5:44 pm

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

Post by hartwig anzt » Tue Nov 18, 2014 10:03 am

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

Noran
Posts: 27
Joined: Fri Sep 26, 2014 3:47 am

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

Post by Noran » Tue Nov 18, 2014 2:46 pm

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

Post Reply