moirai-gpu
GPU launch-shape planning for the Moirai concurrency library.
plan_launch, resident_blocks, and plan_persistent_launch turn a mnemosyne
KernelResourceBudget and a themis GpuTopology into a LaunchShape. The
planner never reshapes a kernel's declared block size, because register and
shared-memory budgets are stated per that width. Unreported capacities yield
None rather than fabricated bounds.
The crate has no device backend. Device acquisition, buffers, transfers, kernel dispatch, and synchronization belong to the Hephaestus providers. Moirai does not depend on them; a device operation is scheduled on Moirai as an ordinary task.
[]
= "0.6"
use ;
// 64 registers/thread, 16 KiB shared memory, 256 threads per block.
let budget = new.unwrap;
// Cover 1000 work items with one thread each.
let shape: LaunchShape = plan_launch;
assert_eq!;
assert_eq!; // ceil(1000 / 256)
Full documentation: https://docs.rs/moirai-gpu
License
Licensed under either of Apache-2.0 or MIT at your option.