An open API service indexing awesome lists of open source software.

https://github.com/termoshtt/accel

(Mirror of GitLab) GPGPU Framework for Rust
https://github.com/termoshtt/accel

cuda gpgpu rust-lang

Last synced: 3 months ago
JSON representation

(Mirror of GitLab) GPGPU Framework for Rust

Awesome Lists containing this project

README

        

Accel: GPGPU Framework for Rust
================================

[![pipeline status](https://gitlab.com/termoshtt/accel/badges/master/pipeline.svg)](https://gitlab.com/termoshtt/accel/commits/master)

|crate |crates.io |docs.rs |GitLab Pages | |
|:-----------|:---------------------------------------------------------------------------|:----------------------------------------------------------------------|:-----------------------------------------------------------------------------|:------------------------------------------|
|accel |[![Crate](http://meritbadge.herokuapp.com/accel)][crate/accel] |[![docs.rs](https://docs.rs/accel/badge.svg)][docs/accel] |[![cargo-doc](https://img.shields.io/badge/doc-master-blue)][dev/accel] |CUDA-based GPGPU framework |
|accel-core |[![Crate](http://meritbadge.herokuapp.com/accel-core)][crate/accel-core] |[![docs.rs](https://docs.rs/accel-core/badge.svg)][docs/accel-core] |[![cargo-doc](https://img.shields.io/badge/doc-master-blue)][dev/accel-core] |Helper for writing device code |
|accel-derive|[![Crate](http://meritbadge.herokuapp.com/accel-derive)][crate/accel-derive]|[![docs.rs](https://docs.rs/accel-derive/badge.svg)][docs/accel-derive]|[![cargo-doc](https://img.shields.io/badge/doc-master-blue)][dev/accel-derive]|Procedural macro for generating kernel code|

[crate/accel]: https://crates.io/crates/accel/0.3.0
[crate/accel-core]: https://crates.io/crates/accel-core/0.3.0
[crate/accel-derive]: https://crates.io/crates/accel-derive/0.3.0

[docs/accel]: https://docs.rs/accel/0.3.0
[docs/accel-core]: https://docs.rs/accel-core/0.3.0
[docs/accel-derive]: https://docs.rs/accel-derive/0.3.0

[dev/accel]: https://termoshtt.gitlab.io/accel/accel/accel
[dev/accel-core]: https://termoshtt.gitlab.io/accel/accel/accel_core
[dev/accel-derive]: https://termoshtt.gitlab.io/accel/accel/accel_derive

Requirements
------------
![minimum supported rust version](https://img.shields.io/badge/rustc-1.42+-red.svg)

- Minimum Supported Rust Version (MSRV) is 1.42.0
- Install [CUDA](https://developer.nvidia.com/cuda-downloads) on your system
- accel depends on CUDA Device APIs through [rust-cuda/cuda-sys](https://github.com/rust-cuda/cuda-sys)
- accel does not depend on CUDA Runtime APIs. It means that a compiled binary requires only `libcuda.so` at runtime, which is far lighter than entire CUDA development toolkit.
- Setup NVPTX target of Rust
- Install `nightly-2020-05-01` toolchain with `nvptx64-nvidia-cuda` target, and [rust-ptx-linker](https://github.com/denzp/rust-ptx-linker)
- There is an [setup script](setup_nvptx_toolchain.sh) for them:

```
curl -sSL https://gitlab.com/termoshtt/accel/raw/master/setup_nvptx_toolchain.sh | bash
```

Or, you can use [docker container](./docker)

Limitations
------------
This project is still in early stage. There are several limitations as following:

- For runtime on CPU
- [Windows](https://gitlab.com/termoshtt/accel/-/issues/25) and macOS are not supported
- [f64](https://gitlab.com/termoshtt/accel/-/issues/53) and [Complex number](https://gitlab.com/termoshtt/accel/-/issues/54) supports are missing
- [Texture/Surface object handling](https://gitlab.com/termoshtt/accel/-/issues/40) is missing
- Async features based on CUDA Stream and Events are disabled until [async/.await support](https://gitlab.com/termoshtt/accel/-/issues/4)

- For writing GPU kernel code
- [libstd cannot be used in writing kernel](https://gitlab.com/termoshtt/accel/-/issues/38)
- [Rust slice cannot be used in writing kernel](https://gitlab.com/termoshtt/accel/-/issues/7)
- [Shared memory](https://gitlab.com/termoshtt/accel/-/issues/39) cannot be used

Contribution
------------
This project is developed on [GitLab](https://gitlab.com/termoshtt/accel) and mirrored to [GitHub](https://github.com/rust-accel/accel).

Sponsors
--------
- [RICOS Co. Ltd](https://www.ricos.co.jp/)
- GPU instances for CI and development

Links
------

Projects which accel depends on:

- [rust-cuda/cuda-sys](https://github.com/rust-cuda/cuda-sys): CUDA Runtime and Driver API binding to Rust
- [denzp/rust-ptx-linker](https://github.com/denzp/rust-ptx-linker): Linker for PTX files generated by `rustc`

Related Projects:

- [rust-cuda/wg](https://github.com/rust-cuda/wg): Working group for Rust CUDA Team
- [denzp/rust-ptx-builder](https://github.com/denzp/rust-ptx-builder): Another CUDA kernel builder from Rust crate
- [bheisler/RustaCUDA](https://github.com/bheisler/RustaCUDA): Another CUDA-based Rust framework