Is it possible to use HYB or ELL sparse matrix multiplication(SPMV) in CUSPARSE 11? - cuda

I am updating my CUDA code with sparse matrix multiplication(SPMV). I found the HYB or ELL format sparse matrix related functions in cuSparse 11 are removed. But for my practical problem, HYB format SPMV runs better than CSR format. Is there any method to reuse HYB format in cuSparse 11? Like including some other library? Or I must write these kernel code myself?
I know this is not a specific code issue. But I really need some advice.

Is it possible to use HYB or ELL sparse matrix multiplication(SPMV) in CUSPARSE 11?
No it is not possible. Those formats were deprecated in CUDA 10.x and are no longer supported.
Reformat your matrix storage to use a supported format. If you believe there is a performance issue, file a bug with a demonstrator.

Related

Eigenvalues and eigenvectors of a complex, non-symmetric matrix using CUDA

How do I use the CUDA cuSOLVER to find the eigenvalues and eigenvectors of a dense, (double precision) complex, non-symmetric matrix?
Looking at the documentation, there are CUDA routines and example code for solving a dense symmetric matrix, using 'syevd'. I've come across another GPU-enabled package, MAGMA, which has the relevant function (magma_zgeev).
Is it possible to find these eigenvalues/vectors using plain CUDA (SDK v8), or do I need an alternate library like MAGMA?
As of the CUDA 11 release, cuSolver continues to offer only routines for obtaining the eigenvalues of symmetric matrices. There are no non-symmetric eigensolvers in cuSolver.

Does cuSolverDN or another CUDA library have a batched-version of QR decomposition for dense matrices to solve A*x = b?

I'm trying to solve A*x = b where A has complex values and is dense.
I used cusolverDnCgeqrf() method from cuSolverDN library to do the QR decomposition for one linear set of equations. However, I want to do this several times to speed up the processing.
Is there a "batched" version of this method? Or is there another CUDA library I can use?
You can use Magma batched QR:
http://icl.cs.utk.edu/projectsfiles/magma/doxygen/group__group__qr__batched.html#details
Or Nvidia batched library:
https://devblogs.nvidia.com/parallelforall/parallel-direct-solvers-with-cusolver-batched-qr/
I am not sure if there are python wrappers for them yet.
I want to add that batched version of many solvers are currently available, either through Magma or Nvidia.
There is not a single standard yet, but it is underway, it is discussed in batched blas workshops:
here
http://www.netlib.org/utk/people/JackDongarra/WEB-PAGES/Batched-BLAS-2017/
and here:
http://www.netlib.org/utk/people/JackDongarra/WEB-PAGES/Batched-BLAS-2016/
The draft is ready and I hope there would be a standard Batched BLAS soon.

Converting from COO to Compressed sparse matrix

I wanted CSR files preferably from matrix market for my OpenCL library, I searched a lot for CSR generators in C but didn't get any. I find matrix market formats comfortable since they have defined the functions for read and write. I'm also curious how CUSP library in CUDA C is able to read COO matrix from an .mtx file and can convert it to CSR format. Thanks in advance
You can see the code for reading matrices in cusp::io.
Before you go reinventing the wheel, you might want to take a look at ViennaCL, which already include OpenCL CSR matrix types, an spMV implementation, and a number of iterative solvers built on that spMV implementation.

Using vectors in CUDA

How to use cudamemcpy for vectors in C++ ? my code works fine for arrays but vectors it doesnt seem to support. Any idea how to support vectors in CUDA?
The short answer is that you can't just using the basic CUDA APIs.
If you want to use STL containers with CUDA, you should look at the thrust template library, which provides and STL like interface to the GPU and a number of useful GPU algorithms to operate on data within container types.

Using ARPACK with PARDISO

This is a question similar to a question here.
I wonder is there already an open source implementation or example of ARPACK Eigensolver that works well with PARDISO solver and Intel mkl library?
I've implemented it already, in C#.
The idea is that one must convert the matrix format in CSR format. Then, one can use MKL to compute linear equation solving algorithm ( using pardiso solver), the matrix-vector manipulation.