Skip to content

Commit d798de9

Browse files
committed
glm5next: clarify soft_max gridDim comment
Assisted-by: Cursor
1 parent 2dc7307 commit d798de9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/models/glm5next.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ ggml_tensor * llama_model_glm5next::graph::build_indexer(
383383
ggml_tensor * ape = ggml_cont(ctx0, ggml_transpose(ctx0, layer.indexer_comp_ape));
384384
gate_t = ggml_add(ctx0, gate_t, ggml_reshape_4d(ctx0, ape, r, d_idx, 1, 1));
385385

386-
// count new pools along ne1: soft_max launches gridDim.y = ne2, capped at 65535, and 262144/4 = 65536
386+
// soft_max maps ne2/ne3 to gridDim.y/z (65535 cap); fold into ne1
387387
ggml_tensor * probs = ggml_soft_max(ctx0, ggml_reshape_2d(ctx0, gate_t, r, d_idx*n_new_max*n_stream));
388388
probs = ggml_reshape_4d(ctx0, probs, r, d_idx, n_new_max, n_stream);
389389
cb(probs, "indexer_pool_probs", il);

0 commit comments

Comments
 (0)