Skip to content

An open-source generalized sparse linear algebra framework with vendor-agnostic GPUs accelerated computations

License

Notifications You must be signed in to change notification settings

LevDenisov/spla

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

547 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Build Python Package Python Package (Test) Docs C/C++ Docs Python Clang Format License

spla is an open-source generalized sparse linear algebra framework for mathematical computations with GPUs acceleration. It provides linear algebra primitives, such as matrices, vectors and scalars, supports wide variety of operations. It gives an ability to customize underlying values types treatment and parametrise operations using built-in or custom user-defined functions.

Note: project under heavy development! Not ready for usage.

Installation

Install the release version of the package from PyPI repository for Windows, Linux and MacOS:

$ pip install pyspla

Install the latest test version of the package from Test PyPI repository for Windows, Linux and MacOS:

$ pip install -i https://test.pypi.org/simple/ pyspla

Delete package if no more required:

$ pip uninstall pyspla

Building from sources

Prerequisites

  • Common:
    • Git (to get source code)
    • CMake (the latest version)
    • Ninja (as build files generator)
    • Python 3.7+
  • Windows 10:
    • Microsoft Visual C++ Compiler (MSVC) with C++ 17 support
    • x64 Native Tools Command Prompt for VS
  • Ubuntu 20.04:
    • GNU C++ Compiler with C++ 17 support
  • MaсOS Catalina 10.15:
    • Clang Compiler with C++ 17 support

Get source code

The following code snippet downloads project source code repository, and enters project root folder. Must be executed from the folder where you want to locate project.

$ git clone https://github.com/SparseLinearAlgebra/spla.git
$ cd spla

Configure and run build

Attention! On Windows platform building commands must be executed in x64 Native Tools Command Prompt for VS.

The following code snippet runs build.py script, which allows configuring cmake and running of actual build with selected options. You can specify build directory, build type, number of system threads for build, enable or disable optionally building of tests and example applications. Must be executed from project root folder.

$ python ./build.py --build-dir=build --build-type=Release --nt=4 --tests=YES --examples=YES

On macOS, you can optionally specify target binaries architecture to build. Pass option --arch with x86_64 or arm64 respectively. By default, build falls back to CMAKE_SYSTEM_PROCESSOR specified architecture. See example bellow, replace <arch> with desired architecture for your build. Must be executed from project root folder.

$ python ./build.py --build-dir=build --build-type=Release --nt=4 --arch=<arch>

Run unit-tests

The following code snippet executed python script, which allows to run all native C++ library unit-tests, located in build directory, specified in --build-dir option. Must be executed from project root folder.

$ python ./run_tests.py --build-dir=build

Contributors

Citation

@online{spla,
  author = {Orachyov, Egor and Grigorev, Semyon},
  title = {spla: An open-source generalized sparse linear algebra framework for GPU computations},
  year = 2022,
  url = {https://github.com/SparseLinearAlgebra/spla},
  note = {Version 1.0.0}
}

Project structure

Entry Description
📁 .github CI/CD scripts and GitHub related files
📁 deps Third-party project dependencies, stored as submodules
📁 docs Documentations and digital stuff
📁 examples Example applications of library C/C++ usage
📁 include Library public C/C++ header files
📁 src Library private compiled source directory
📁 tests Library C/C++ unit-tests
📁 python Python package bindings for library API
📄 CMakeLists.txt CMake library configuration, add as sub directory to your project
📄 build.py Script to build library sources, tests and examples
📄 bump_version.py Script to increment or update version of package before release
📄 run_tests.py Script to run compiled library unit tests
📄 generate.py Script to re-generate .hpp bindings from .cl source files

License

This project licensed under MIT License. License text can be found in the license file.

About

An open-source generalized sparse linear algebra framework with vendor-agnostic GPUs accelerated computations

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C++ 83.3%
  • C 9.3%
  • Python 5.9%
  • CMake 1.5%