Skip to content

Commit

Permalink
[Bugfix][Kernel] Fix moe align block issue for mixtral (vllm-project#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ElizaWszola authored Jan 25, 2025
1 parent 3132a93 commit 221d388
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion csrc/moe/moe_align_sum_kernels.cu
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ __global__ void moe_align_block_size_kernel(scalar_t* __restrict__ topk_ids,

extern __shared__ int32_t shared_mem[];
int32_t* cumsum = shared_mem; // 1d tensor with shape (num_experts + 1)
token_cnts_t* tokens_cnts = (token_cnts_t*)(shared_mem + blockDim.x + 1);
token_cnts_t* tokens_cnts =
(token_cnts_t*)(shared_mem + num_experts +
1); // 2d tensor with shape (blockDim.x + 1, num_experts)

for (int i = 0; i < num_experts; ++i) {
tokens_cnts[index(num_experts, threadIdx.x + 1, i)] = 0;
Expand Down

0 comments on commit 221d388

Please sign in to comment.