Skip to main content

Crate rakka_accel

Crate rakka_accel 

Source
Expand description

§rakka-accel

Actor-shaped face for compute-acceleration backends, on top of the rakka actor runtime. NVIDIA CUDA is the first shipping implementation (rakka-accel-cuda); the same trait surface accommodates AMD ROCm, Apple Metal, Intel oneAPI, and Vulkan compute when those land.

[dependencies]
rakka-accel = { version = "0.0", features = ["cuda"] }
use rakka_accel::prelude::*;
use rakka_accel::cuda;          // re-export of `rakka-accel-cuda`

§What this crate is

A thin core that names the abstractions every backend has to satisfy:

  • AccelBackend — marker trait identifying a backend, with associated Device, Stream, Event, Error types.
  • AccelRef — generation-validated typed device pointer parametric over the backend.
  • AccelError — typed error enum, #[non_exhaustive] so backends can add LibraryError variants without breaking core.
  • CompletionStrategy — async wakeup contract for kernel completion (host-fn callback, sync, polled).
  • KernelOp — marker trait for typed op envelopes (Sgemm, RngFillUniform, etc.).

The core deliberately ships no concrete actors. Each backend crate provides its own DeviceActor, KernelActor family, and library wrappers. The umbrella re-exports the active backend at rakka_accel::cuda (and, eventually, rakka_accel::rocm, rakka_accel::metal, etc.) so users have one stable import path.

§What this crate is not

  • A least-common-denominator API. Backends expose more than the trait surface — rakka_accel::cuda::kernel::CudnnActor has a richer message set than KernelOp knows about, and that’s fine. The trait surface is for portable code; backend-specific work uses the concrete crate directly.
  • A device-abstraction layer like wgpu or SYCL. We don’t try to compile one shader to many targets. We supervise the right library on the right hardware.

Re-exports§

pub use backend::AccelBackend;
pub use backend::AccelDevice;
pub use backend::AccelStream;
pub use completion::CompletionStrategy;
pub use error::AccelError;
pub use gpu_ref::AccelRef;
pub use kernel::KernelOp;

Modules§

backend
Backend identity traits.
completion
CompletionStrategy — async wakeup contract for kernel completion. Promoted to the core so every backend can plug into the same family (host-fn callback, sync block, polled query).
error
Backend-agnostic error taxonomy.
gpu_ref
AccelRef<T, B> — backend-agnostic typed device pointer.
kernel
KernelOp — marker trait for typed kernel-op envelopes.
prelude
Canonical re-exports. use rakka_accel::prelude::*;.