Skip to content

Commit b0a18b5

Browse files
danbevarthw
authored andcommitted
llama : make cell_id const in inp_s_mask block (ggml-org#9470)
This commit makes the cell_id variable const in the inp_s_mask block. The motivation for this change is consistency with the code in the inp_s_copy block.
1 parent d3007e3 commit b0a18b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/llama.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15830,7 +15830,7 @@ static void llama_set_inputs(llama_context & lctx, const llama_ubatch & batch) {
1583015830

1583115831
// clear unused states
1583215832
for (int i = 0; i < n_kv; ++i) {
15833-
uint32_t cell_id = i + kv_self.head;
15833+
const uint32_t cell_id = i + kv_self.head;
1583415834
llama_kv_cell & kv_cell = lctx.kv_self.cells[cell_id];
1583515835

1583615836
data[i] = (float) (kv_cell.src >= 0);

0 commit comments

Comments
 (0)