Skip to main content

plan_dispatch_2d

Function plan_dispatch_2d 

Source
pub fn plan_dispatch_2d(
    limits: &Limits,
    rows_m: u32,
    cols_n: u32,
    tile: Workgroup2D,
    batch: u32,
) -> Result<DispatchGrid, String>
Expand description

Plan a 2-D tiled dispatch for an m x n output covered by a tile.x * tile.y workgroup, optionally with a batch Z-dimension.

Used by GEMM (grid.z == 1) and batched GEMM (grid.z == batch). Returns an error string if any axis would exceed the per-axis workgroup cap.