#[non_exhaustive]pub enum CubeclUtilsErrors {
CubeCountExceeded {
kernel: &'static str,
requested: (u32, u32, u32),
limit: (u32, u32, u32),
},
GridTooLarge {
total_cubes: u32,
max_dim: u32,
},
BindingTooLarge {
requested: u64,
limit: u64,
},
SharedMemoryExceeded {
kernel: &'static str,
requested: usize,
available: usize,
},
CubeClServerError(ServerError),
}Expand description
All error variants that can occur across cubecl-utils-rs operations.
Marked #[non_exhaustive] so that added variants do not break a downstream
exhaustive match. Match on the variants you care about and keep a _ arm.
Every variant here describes a condition that CubeCL itself reports either silently or in the wrong place. See the crate-level docs for why that matters.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CubeCountExceeded
A dispatch exceeds the device’s per-dimension cube-count limit.
Not a soft failure on wgpu: the launch is rejected on the CubeCL server
thread, that thread dies, and every subsequent call on the client
returns an unrelated CallError from somewhere else entirely.
Fields
GridTooLarge
A flat cube count cannot be expressed as a 2D grid within the limit.
Reachable only when total_cubes exceeds max_dim * max_dim, i.e. past
roughly 4.29e9 cubes against a 65535 limit.
Fields
BindingTooLarge
A single buffer exceeds the device’s per-binding size limit.
Over-sized bindings are rejected without an error surfacing: the kernel does no work and returns zeros, so the condition is caught on the host before the allocation instead.
A kernel’s shared-memory footprint exceeds the device’s per-workgroup budget.
Carries the budget so the caller can report what would have fitted. Apple Silicon reports 32768 bytes, which is at the low end of what desktop hardware offers but above the 16384 that some integrated parts report.
CubeClServerError(ServerError)
Propagate errors from the CubeCL runtime.
Trait Implementations§
Source§impl Debug for CubeclUtilsErrors
impl Debug for CubeclUtilsErrors
Source§impl Display for CubeclUtilsErrors
impl Display for CubeclUtilsErrors
Source§impl Error for CubeclUtilsErrors
impl Error for CubeclUtilsErrors
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()