pub fn checked_cube_count(
kernel: &'static str,
x: u32,
y: u32,
z: u32,
limits: &GpuLimits,
) -> Result<CubeCount, CubeclUtilsErrors>Expand description
Build a static cube count, checked against the device’s per-dimension limit.
A dispatch that busts the limit is not a soft failure. 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. Catching it here turns that into a typed error naming the kernel.
§Params
kernel- Kernel name, for the error message onlyx- Requested cubes along xy- Requested cubes along yz- Requested cubes along zlimits- Device limits fromGpuLimits::from_client
§Returns
CubeCount::Static(x, y, z), or CubeCountExceeded if any dimension is
over the device limit.