From a27d661aebcc52ee3f893afdbeb85f8d2f722207 Mon Sep 17 00:00:00 2001 From: Kawrakow Date: Tue, 21 Oct 2025 10:10:38 +0300 Subject: [PATCH] Fix fused grouped topk (#851) Co-authored-by: Iwan Kawrakow --- ggml/src/ggml-cuda.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ggml/src/ggml-cuda.cu b/ggml/src/ggml-cuda.cu index 74597763..9a0e7ee3 100644 --- a/ggml/src/ggml-cuda.cu +++ b/ggml/src/ggml-cuda.cu @@ -3187,7 +3187,7 @@ static bool ggml_cuda_compute_forward(ggml_backend_cuda_context & ctx, struct gg cgraph->nodes[i+2]->op == GGML_OP_ADD && cgraph->nodes[i+3]->op == GGML_OP_GROUPED_TOPK && cgraph->nodes[i+4]->op == GGML_OP_GET_ROWS) { - cuda_bailingmoev2_experts(ctx, cgraph->nodes[i+4], cgraph->nodes[i+4]); + cuda_bailingmoev2_experts(ctx, cgraph->nodes[i+4], cgraph->nodes[i+3]); i += 4; } else { ggml_cuda_op_sigmoid(ctx, dst);