Skip to main content

Module backend

Module backend 

Source
Expand description

Backend identity traits.

A atomr-accel backend (CUDA, ROCm, Metal, oneAPI, Vulkan compute, …) is a coherent triple of device handle, stream / queue, and event / fence types. These traits name them so portable code can be parameterized over B: AccelBackend without committing to a vendor SDK.

Backends still expose richer concrete types directly — the cuBLAS / cuDNN / cuFFT actors live in the atomr-accel-cuda crate and are not part of this trait surface. The traits here capture only the shape that every backend has to provide.

Traits§

AccelBackend
Marker trait identifying a compute-acceleration backend.
AccelDevice
Device-handle contract: identification + a hook to observe generation rebuilds (sticky-error recovery).
AccelStream
Stream / queue contract: ordered submission of work, plus the ability to record an event for cross-stream synchronization.

Type Aliases§

Device
Convenience type alias for a shared device handle. Every backend hands out devices through Arc<B::Device> so they survive context rebuilds without invalidating the outer ActorRef.
Stream
Convenience type alias for a shared stream handle.