flashinfer.fused_moe.BGMVMoEPortablePlan¶
- class flashinfer.fused_moe.BGMVMoEPortablePlan(*, y_accum: Tensor, shrink_out: Tensor, x: Tensor, lora_a_weights: List[Tensor], lora_b_weights: List[Tensor], sorted_token_ids: Tensor, expert_ids: Tensor, lora_indices: Tensor, topk_weights: Tensor, num_experts: int, fallback_reason: str)¶
Prepared plan that runs the portable
bgmv_moe_shrink+bgmv_moe_expandpath.Returned by
prepare_bgmv_moe()when the inputs are outside the generated Cake support set andfallback=True. Same interface asBGMVMoECakePlan(runzeroes the workspaces, runs shrink and expand, and returns the FP32 accumulator; first eager call captures a CUDA Graph). The portable expand accumulates with atomics, so replays are not guaranteed bitwise identical.backend_usedis"portable"andschedule_idisNone.- __init__(*, y_accum: Tensor, shrink_out: Tensor, x: Tensor, lora_a_weights: List[Tensor], lora_b_weights: List[Tensor], sorted_token_ids: Tensor, expert_ids: Tensor, lora_indices: Tensor, topk_weights: Tensor, num_experts: int, fallback_reason: str) None¶
Methods
__init__(*, y_accum, shrink_out, x, ...)close()Release graph resources after pending replay work completes.
run()Run or replay the prepared zero+shrink+expand pipeline.
Attributes
backend_used