clSPARSE
v0.10.0.0
a software library containing Sparse functions written in OpenCL
|
Pre-built binaries are available on our releases page
Build branch | master | develop |
---|---|---|
GCC/Clang x64 | ||
Visual Studio x64 |
an OpenCL™ library implementing Sparse linear algebra routines. This project is a result of a collaboration between AMD Inc. and Vratis Ltd..
This release introduces breaking API changes from the prior version. clSPARSE is still in a beta phase, and we may need to change the API at times to increase maintainability or fix design issues. A few changes are introduced to more closely follow the recently published Cpp Core Guidelines, a strong candidate to be the coding guidelines to be used in clSPARSE. Changes are noted below.
clsparseCsrMetaCompute()
renamed to clsparseCsrMetaCreate()
, to more intuitively pair with theclsparseCsrMetaDelete()
clsparseIdx_t
to abstract the size of an index from the library interface; the only choice currently is 4 bytes. If users use this datatype for indices in their code, changing to 8-byte indices in the future should only be a recompile.colIndices
to col_indices
rowIndices
to row_indices
rowOffsets
to row_pointer
(renamed to pointer to remove confusion with buffer offsets for cl1.2)offValues
to off_values
offColInd
to off_col_indices
offRowOff
to off_row_pointer
offValues
to off_values
True in spirit with the other clMath libraries, clSPARSE exports a “C” interface to allow projects to build wrappers around clSPARSE in any language they need. A great deal of thought and effort went into designing the API’s to make them less ‘cluttered’ compared to the older clMath libraries. OpenCL state is not explicitly passed through the API, which enables the library to be forward compatible when users are ready to switch from OpenCL 1.2 to OpenCL 2.0 3
Two mailing lists have been created for the clMath projects:
Good software is typically the result of iteration and feedback. clSPARSE follows the semantic versioning guidelines, and while the major version number remains '0', the public API should not be considered stable. We release clSPARSE as beta software (0.y.z) early to the community to elicit feedback and comment. This comes with the expectation that with feedback, we may incorporate breaking changes to the API that might require early users to recompile, or rewrite portions of their code as we iterate on the design.
The project wiki contains helpful documentation. A build primer is available, which describes how to use cmake to generate platforms specific build files
clSPARSE contains a directory of simple OpenCL samples that demonstrate the use of the API in both C and C++. The superbuild script for clSPARSE also builds the samples as an external project, to demonstrate how an application would find and link to clSPARSE with cmake.
API documentation is available at http://clmathlibraries.github.io/clSPARSE/. The samples give an excellent starting point to basic library operations.
Please refer to and read the Contributing document for guidelines on how to contribute code to this open source project. Code in the /master branch is considered to be stable and new library releases are made when commits are merged into /master. Active development and pull-requests should be made to the develop branch.
clSPARSE is licensed under the Apache License, Version 2.0
xcode-select --install
)[1]: Changed to reflect CppCoreGuidelines: F.21
[2]: Changed to reflect CppCoreGuidelines: NL.8
[3]: OpenCL 2.0 support is not yet fully implemented; only the interfaces have been designed