Accel v0.1.0 released: GPGPU Framework for Rust


I would like to announce the release of termoshtt/accel, a CUDA-based GPGPU framework for Rust.This is an experimental project with three following key features. Although it has still several limitations, you can start hacking GPGPU computing in Rust :slight_smile: I hope your feedback!

Compile PTX Kernel from Rust using NVPTX backend of LLVM

From 2017/2, we can compile Rust into a PTX assembla using NVPTX backend of LLVM as demonstrated in japaric/nvptx, however, it needs a complicated setting. Accel generates this setting automatically using procedural macro feature.

proc-macro-attribute-based approach like futures-await

accel-derive crate introduces a proc-macro #[kernel], which generates two functions. One is compiled into a PTX code, called “kernel”, and the other calls it from CPU code using cudaLaunchKernel, called “caller”. A support crate rust2ptx is created while the proc-macro at $HOME/.rust2ptx directory, and compiles the generated function (saved as using xargo. Generated PTX assembla is inserted into the source code of “caller” and thus embedded into the executable binary.

Simple memory management using Unified Memory

Unified memory (UM) is a feature introduced in CUDA6 and extended in CUDA8. We can manage memory without considering the memory is on CPU or GPU. Accel introduces accel::UVec struct which manage UM as RAII and you can use it as a slice through Deref.


Great work!

I like it, but I think it may be not should requirement rustup?


How else would you do it, considering that it uses unstable compiler features?


I’m switching to nightly-2017011-17 on rust2ptx crate since japaric/core64 goes unsupported soon.


I think there should be a flag that allows user to choose toolchain.


ok, it’s good. I will impl it.