Skip to content

Commit 489554b

Browse files
ikawrakowIwan Kawrakow
andauthored
Minor: remove unnecesssary calls to build_inp_out_ids (#935)
Co-authored-by: Iwan Kawrakow <[email protected]>
1 parent e4145c0 commit 489554b

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/llama-build-context.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6474,7 +6474,6 @@ ggml_cgraph * llm_build_context::build_glm4_moe() {
64746474
// crop output on last layer
64756475
if (il == n_transformer_layers - 1 && inp_out_ids) {
64766476
// skip computing output for unused tokens
6477-
ggml_tensor * inp_out_ids = build_inp_out_ids();
64786477
cur = ggml_get_rows(ctx0, cur, inp_out_ids);
64796478
inpSA = ggml_get_rows(ctx0, inpSA, inp_out_ids);
64806479
}
@@ -7776,7 +7775,6 @@ ggml_cgraph * llm_build_context::build_ernie4_5() {
77767775
}
77777776

77787777
if (il == n_layer - 1 && inp_out_ids) {
7779-
ggml_tensor * inp_out_ids = build_inp_out_ids();
77807778
cur = ggml_get_rows(ctx0, cur, inp_out_ids);
77817779
inpSA = ggml_get_rows(ctx0, inpSA, inp_out_ids);
77827780
}

0 commit comments

Comments
 (0)