[Kernel] Fuse DeepEP-v2 decode globalize+align into one launch (#53911)

Signed-off-by: Elvir Crncevic <elvircrn@gmail.com>
This commit is contained in:
Elvir Crnčević
2026-10-13 11:10:38 -04:00
committed by GitHub
parent 669f85e686
commit b9b401b2ef
10 changed files with 686 additions and 16 deletions
+10
View File
@@ -44,6 +44,16 @@ void moe_align_block_size(torch::stable::Tensor topk_ids, int64_t num_experts,
std::optional<torch::stable::Tensor> maybe_expert_map,
std::optional<torch::stable::Tensor> scatter_idx);
#ifdef USE_CUDA
void fused_globalize_align_block_size(
torch::stable::Tensor topk_idx, torch::stable::Tensor psum,
int64_t rank_expert_offset, int64_t global_num_experts,
int64_t local_num_experts, int64_t block_size,
torch::stable::Tensor sorted_ids, torch::stable::Tensor expert_ids,
torch::stable::Tensor num_tokens_post_pad,
std::optional<torch::stable::Tensor> scatter_idx);
#endif
void batched_moe_align_block_size(
int64_t max_tokens_per_batch, int64_t block_size,
const torch::stable::Tensor& expert_num_tokens,