[][src]Crate accel_core

Support crate for writting GPU kernel in Rust

  • This crate works only for nvptx64-nvidia-cuda target
  • There is no support of libstd for nvptx64-nvidia-cuda target, i.e. You need to write #![no_std] Rust code.
  • alloc crate is supported by accel_core::PTXAllocator which utilizes CUDA malloc/free system-calls
    • You can use println! and assert_eq! throught it.

Macros

assert_eq

Assertion in GPU kernel for two expressions are equal.

assert_ne

Assertion in GPU kernel for two expressions are not equal.

print

Alternative of std::print! using CUDA vprintf system-call

println

Alternative of std::println! using CUDA vprintf system-call

Structs

Dim3

Dimension specified in kernel launching

Idx3

Indices where the kernel code running on

PTXAllocator

Memory allocator using CUDA malloc/free

Functions

block_dim
block_idx
grid_dim
index
thread_idx