matusi143
matusi143

Reputation: 113

Solve for Ax=B where A is a sparse matrix in openCL

Does anyone know of a library or example of openCL code which will solve for Ax=B where A is large and sparse? I do not want to calculate the inverse of A as it would be very large and dense. The A matrix is >90% sparse and just calculating x is likely far less memory and computationally intensive.

The following post will help me on the CPU and looks like a good option but I really need the speedup of the GPU for this application.

C++ Memory Efficient Solution for Ax=b Linear Algebra System

Upvotes: 3

Views: 4054

Answers (3)

luksmir
luksmir

Reputation: 3154

There is also SpeedIT OpenCL:

This version of SpeedIT utilizes the power of OpenCL framework, which allows to use computational power of suitable GPUs. The SpeedIT OpenCL library provides a set of accelerated solvers and functions for sparse linear systems of equations which are:

  • Preconditioned Conjugate Gradient solver

    • Preconditioned Stabilized Bi-Conjugate Gradient solver

    • Accelerated Sparse Matrix-Vector Multiplication

    • Preconditioners:

    ◦ Jacobi diagonal

    ◦ Row scaling with norms l1, l2 and l∞

    ◦ ILU0 – Incomplete LU with 0 filling

Upvotes: 2

Cool_Coder
Cool_Coder

Reputation: 5083

You can solve Linear Simultaneous Equations of the form AX=B using Sequalator. You can either use the OpenCL functionality or the multi threaded CPU functionality as per your hardware requirements. You can also analyse the solutions to get an understanding of the errors in equations after substituting the solutions.

Upvotes: 1

Hugo Maxwell
Hugo Maxwell

Reputation: 763

What you are looking for is a Sparse Linear System Solver. For OpenCL take a look at ViennaCL: http://viennacl.sourceforge.net/ It has Conjugate Gradient, Stabilized Bi-Conjugate Gradient, Generalized Minimum Residual solvers.

However if you want to solve it efficiently you need a multigrid method. Take a look at: http://www.paralution.com/

PARALUTION is a library which enables you to perform various sparse iterative solvers and preconditioners on multi/many-core CPU and GPU devices.

Upvotes: 4

Related Questions