Skip to main content

Module gpu

Module gpu 

Source
Expand description

Backend-neutral GPU seam: storage identity, the allocation a buffer carries, and the failure vocabulary every GPU backend reports through.

Nothing here names a CUDA (or any other vendor) type. A backend implements Backend to name its own allocation handle; the shared layer stores and passes allocations as [Buffer<B>] and never reads a vendor type. The seam exists so a second backend (ROCm/HIP, then Metal) is added without touching the dispatch, transfer or publication code.

§Examples

use tenferro_gpu::gpu::{GpuError, SeamError};

let error = GpuError::unsupported("gemm", "the vendor adapter is not installed");
assert_eq!(error.kind(), SeamError::Unsupported);

Traits§

Backend
One GPU backend: the concrete types the seam carries without naming them.