nvptx toolchain

Crate docs.rs CircleCI

Compile Rust into PTX/cubin

Install

nvptx command

nvptx is a CLI tool to

cargo install nvptx

accel-nvptx toolchain

accel-nvptx is a toolchain name for rustup. It contains rustc and runtime libraries with nvptx64-nvidia-cuda target.

nvptx install

This installs accel-nvptx toolchain to rustup like:

$ rustup toolchain list stable-x86_64-unknown-linux-gnu nightly-x86_64-unknown-linux-gnu (default) accel-nvptx

This toolchain is built from - rust-accel/rust - rust-accel/libc

Build

You can build your crate using accel-nvptx toolchain into a PTX file

nvptx build

This consists of following three steps:

cargo +accel-nvptx build --target nvptx64-nvidia-cuda