Giter Site home page Giter Site logo

fjramireg / clsparse Goto Github PK

View Code? Open in Web Editor NEW

This project forked from clmathlibraries/clsparse

0.0 2.0 0.0 2.09 MB

a software library containing Sparse functions written in OpenCL

License: Apache License 2.0

CMake 6.75% API Blueprint 0.17% C++ 71.37% C 21.71%

clsparse's Introduction

Build Status

Pre-built binaries are available on our releases page

Build branch master develop
GCC/Clang x64 Build Status Build Status
Visual Studio x64 Build status Build status

clSPARSE

an OpenCL™ library implementing Sparse linear algebra routines. This project is a result of a collaboration between AMD Inc. and Vratis Ltd..

What's new in clSPARSE v0.10

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.

  • The API to create meta data for a csr encoded sparse matrix has changed. This is an attempt to hide the implementation details of how meta data is stored from the user. This allows the library freedom to change and iterate meta data without breaking clients.
    • clsparseCsrMetaCompute() renamed to clsparseCsrMetaCreate(), to more intuitively pair with the
    • New API clsparseCsrMetaDelete()
  • A few routines changed pure 'out' parameters to be returned on the stack as structs1
    • clsparseCreateControl()
    • clsparseGetEvent()
    • clsparseCreateSolverControl()
    • clsparseCsrMetaSize()
  • A new index type has been introduced 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.
  • The names of member variables in our public structs have been renamed for consistency. Before, our member variables was not consistent with camel case and underscore naming. Member variables are now standardized to use underscores, but we keep camel casing for function and struct names2
    • 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
  • All samples have been changed to compile with the above changes.

clSPARSE features

  • Sparse Matrix - dense Vector multiply (SpM-dV)
  • Sparse Matrix - dense Matrix multiply (SpM-dM)
  • Sparse Matrix - Sparse Matrix multiply Sparse Matrix Multiply(SpGEMM) - Single Precision
  • Iterative conjugate gradient solver (CG)
  • Iterative biconjugate gradient stabilized solver (BiCGStab)
  • Dense to CSR conversions (& converse)
  • COO to CSR conversions (& converse)
  • Functions to read matrix market files in COO or CSR format

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

Google Groups

Two mailing lists have been created for the clMath projects:

  • [email protected] - group whose focus is to answer questions on using the library or reporting issues

  • [email protected] - group whose focus is for developers interested in contributing to the library code itself

API semantic versioning

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.

clSPARSE Wiki

The project wiki contains helpful documentation.
A build primer is available, which describes how to use cmake to generate platforms specific build files

Samples

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.

clSPARSE library documentation

API documentation is available at http://clmathlibraries.github.io/clSPARSE/. The samples give an excellent starting point to basic library operations.

Contributing code

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.

License

clSPARSE is licensed under the Apache License, Version 2.0

Compiling for Windows

  • Windows® 7/8
  • Visual Studio 2013 and above
  • CMake 2.8.12 (download from Kitware)
  • Solution (.sln) or
  • Nmake makefiles
  • An OpenCL SDK, such as APP SDK 3.0

Compiling for Linux

  • GCC 4.8 and above
  • CMake 2.8.12 (install with distro package manager )
    • Unix makefiles or
    • KDevelop or
    • QT Creator
  • An OpenCL SDK, such as APP SDK 3.0

Compiling for Mac OSX

  • CMake 2.8.12 (install via brew)
  • Unix makefiles or
  • XCode
  • An OpenCL SDK (installed via xcode-select --install)

Bench & Test infrastructure dependencies

  • Googletest v1.7
  • Boost v1.58

Footnotes

[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

clsparse's People

Contributors

adambrouwersharries avatar ghisvail avatar jlgreathouse avatar jpola avatar kvaragan avatar shuaiche avatar

Watchers

 avatar  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.