permute/unpermute kernel for moe optimization (#14568)

Signed-off-by: Caleb_Du <Caleb_Du@zju.edu.cn>
This commit is contained in:
Caleb_Du
2025-05-03 02:31:55 +08:00
committed by GitHub
parent 0f87d8f7b2
commit 3e887d2e0c
19 changed files with 1474 additions and 28 deletions

View File

@@ -420,7 +420,8 @@ def test_fused_marlin_moe(
score = torch.randn((m, e), device="cuda", dtype=dtype)
topk_weights, topk_ids = fused_topk(a, score, topk, False)
topk_weights, topk_ids, token_expert_indices = fused_topk(
a, score, topk, False)
torch_output = torch_moe(a, w_ref1, w_ref2, score, topk, e_map)