In this article
Grouping changes how independent GEMM problems share a launch; every reordered shape must remain paired with its pointers and leading dimensions.
Start with heterogeneous problems
Grouped GEMM is useful when independent matrix products have different problem sizes and still belong in a shared launch. The official C++ grouped example stores problem sizes, matrix pointers, and leading dimensions in corresponding arrays. This differs from assuming a uniform batched shape. The discussion here follows the documented C++ grouped scheduler family; its named scheduling modes should not be treated as a universal API for every newer CUTLASS or CuTe implementation.
Keep the descriptor arrays together
Imagine an expert layer whose active experts receive different token counts. Each problem descriptor identifies a shape together with the matrices and layout information used to execute it. If an optimization sorts only shapes while leaving pointer arrays unchanged, a scheduler can execute valid-looking dimensions against the wrong allocation. Preserve the entire descriptor association when reordering. Maintain the mapping back to application outputs as well, so a correct matrix product does not get assigned to the wrong expert.
Separate block count from work count
The grouped scheduler documentation describes persistent blocks that visit multiple tiles across problems. The launch can use fewer blocks than the total number of tiles. A problem visitor maps scheduled tile indices to particular problems and locations. Therefore neither the number of problems nor the number of launched blocks directly equals the amount of completed matrix work; account for the actual problem dimensions and tile assignments.
Choose where scheduling metadata is prepared
The documented kDeviceOnly mode performs scheduling work on the device, while kHostPrecompute prepares schedule information on the host. Which path makes sense depends partly on where problem parameters originate and whether host preparation can overlap useful work. Copying device-produced sizes back to the host solely to select a seemingly faster scheduler can introduce a new dependency. Measure preparation and transfer costs alongside kernel execution rather than comparing the arithmetic stage in isolation.
Validate the permutation and execution separately
The grouped kernel source exposes the problem-visitor structure behind this family. Check a deliberately uneven collection against independent reference products before tuning order or launch size. Equal tile counts need not imply equal work when reduction dimensions differ. The existing persistent work-queue guide explains reuse of running blocks, and GPU acceptance evidence helps record validation. The distinctive obligation here is keeping heterogeneous problem identities and their data inseparable throughout scheduling.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.