1#[derive(Debug, thiserror::Error)]
5pub enum KaioError {
6 #[error("CUDA driver error: {0}")]
8 Cuda(#[from] cudarc::driver::DriverError),
9
10 #[error("out of device memory: requested {requested} bytes")]
12 OutOfMemory {
13 requested: usize,
15 },
16
17 #[error("invalid kernel configuration: {0}")]
19 InvalidConfig(String),
20
21 #[error("device not found: ordinal {0}")]
23 DeviceNotFound(usize),
24
25 #[error("PTX module load failed: {0}")]
27 PtxLoad(String),
28}
29
30pub type Result<T> = std::result::Result<T, KaioError>;