Code Monkey home page Code Monkey logo

hipsparse's Introduction

hipSPARSE

hipSPARSE is a SPARSE marshalling library with multiple supported backends. It sits between your application and a 'worker' SPARSE library, where it marshals inputs to the backend library and marshals results to your application. hipSPARSE exports an interface that doesn't require the client to change, regardless of the chosen backend. Currently, hipSPARSE supports rocSPARSE and cuSPARSE backends.

Documentation

Documentation for hipSPARSE is available at https://rocm.docs.amd.com/projects/hipSPARSE/en/latest/.

To build our documentation locally, run the following code:

cd docs

pip3 install -r sphinx/requirements.txt

python3 -m sphinx -T -E -b html -d _build/doctrees -D language=en . _build/html

Alternatively, build with CMake:

cmake -DBUILD_DOCS=ON ...

Installing pre-built packages

Download pre-built packages from ROCm's package servers using the following code:

`sudo apt update && sudo apt install hipsparse`

Build hipSPARSE

To build hipSPARSE, you can use our bash helper script (for Ubuntu only) or you can perform a manual build (for all supported platforms).

  • Bash helper script (install.sh): This script, which is located in the root of this repository, builds and installs hipSPARSE on Ubuntu with a single command. Note that this option doesn't allow much customization and hard-codes configurations that can be specified through invoking CMake directly. Some commands in the script require sudo access, so it may prompt you for a password.

    `./install -h`  # shows help
    `./install -id` # builds library, dependencies, then installs (the `-d` flag only needs to be passed once on a system)
  • Manual build: If you use a distribution other than Ubuntu, or would like more control over the build process, the hipSPARSE build wiki provides information on how to configure CMake and build hipSPARSE manually.

Supported functions

You can find a list of exported functions on our wiki.

Interface examples

The hipSPARSE interface is compatible with rocSPARSE and cuSPARSE-v2 APIs. Porting a CUDA application that calls the cuSPARSE API to an application that calls the hipSPARSE API is relatively straightforward. For example, the hipSPARSE SCSRMV interface is:

CSRMV API

hipsparseStatus_t
hipsparseScsrmv(hipsparseHandle_t handle,
                hipsparseOperation_t transA,
                int m, int n, int nnz, const float *alpha,
                const hipsparseMatDescr_t descrA,
                const float *csrValA,
                const int *csrRowPtrA, const int *csrColIndA,
                const float *x, const float *beta,
                float *y);

hipSPARSE assumes matrix A and vectors x, y are allocated in GPU memory space filled with data. Users are responsible for copying data to and from the host and device memory.

hipsparse's People

Contributors

ntrost57 avatar jsandham avatar yvanmokwinski avatar dependabot[bot] avatar agonzales-amd avatar amdkila avatar eidenyoshida avatar arvindcheru avatar saadrahim avatar samjwu avatar randyh62 avatar lawruble13 avatar pruthvistony avatar cgmb avatar angeloo01 avatar afanfa avatar raramakr avatar aaronenyeshi avatar alexbrownamd avatar poznano-amd avatar lisadelaney avatar matyas-streamhpc avatar maetveis avatar evetsso avatar urmbista avatar aligirayhanozbay avatar pavahora avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.