From 2b685f2f0572358d8ec993444ebd2c3a0d8334a4 Mon Sep 17 00:00:00 2001 From: Aman Gupta Date: Mon, 16 Mar 2026 09:30:32 +0100 Subject: [PATCH] handle broadcast --- ggml/src/ggml-cpu/ggml-cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ggml/src/ggml-cpu/ggml-cpu.c b/ggml/src/ggml-cpu/ggml-cpu.c index 569ba57b4e..2a85949765 100644 --- a/ggml/src/ggml-cpu/ggml-cpu.c +++ b/ggml/src/ggml-cpu/ggml-cpu.c @@ -3078,7 +3078,8 @@ static thread_ret_t ggml_graph_compute_thread(void * data) { struct ggml_tensor * glu = cgraph->nodes[node_n + 2]; // Fused path for `--n-cpu-moe` when n_tokens = 1 if (node->src[1] == node1->src[1] && node->src[2] == node1->src[2] && - node->src[1]->ne[2] == 1 && ggml_get_glu_op(glu) == GGML_GLU_OP_SWIGLU) { + ggml_nrows(node->src[1]) == 1 && + ggml_get_glu_op(glu) == GGML_GLU_OP_SWIGLU) { ggml_compute_forward_fused_moe_silu(¶ms, node, node1, glu); fused_nodes = 2; }