For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo struct
Struct_moe_create_indices_with_slots
struct Struct_moe_create_indices_with_slots
Registers the mo.moe.create.indices.with.slots graph op with the graph compiler.
Implemented traitsโ
Methodsโ
executeโ
static def execute[slot_stride: Int, expert_offset: Int, local_experts: Int, target: StaticString](token_expert_order: ManagedTensorSlice[IOSpec[_, _].Output, static_spec=token_expert_order.static_spec], expert_start_indices: ManagedTensorSlice[IOSpec[_, _].Output, static_spec=expert_start_indices.static_spec], restore_token_order: ManagedTensorSlice[IOSpec[_, _].Output, static_spec=restore_token_order.static_spec], expert_ids: ManagedTensorSlice[IOSpec[_, _].Output, static_spec=expert_ids.static_spec], expert_usage_stats: ManagedTensorSlice[IOSpec[_, _].Output, static_spec=expert_usage_stats.static_spec], scales_offset: ManagedTensorSlice[IOSpec[_, _].Output, static_spec=scales_offset.static_spec], slot_token: ManagedTensorSlice[IOSpec[_, _].Output, static_spec=slot_token.static_spec], slot_weight: ManagedTensorSlice[IOSpec[_, _].Output, static_spec=slot_weight.static_spec], scale_slot: ManagedTensorSlice[IOSpec[_, _].Output, static_spec=scale_slot.static_spec], topk_ids: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=topk_ids.static_spec], slot_weights: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=slot_weights.static_spec], context: DeviceContext)