Skip to main content

build_program_sharded_slots

Function build_program_sharded_slots 

Source
pub fn build_program_sharded_slots(
    workgroup_size_x: u32,
    slot_count: u32,
    opcodes: &[OpcodeHandler],
) -> Program
Expand description

Build the megakernel IR for an explicit number of ring slots.

This is the production sharded ABI: slot_count sizes the ring buffer, while workgroup_size_x controls lanes per workgroup. Dispatch must launch slot_count / workgroup_size_x workgroups so every slot has an owning lane.