Skip to content

Commit befaf11

Browse files
authored
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 feff4aa commit befaf11

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
@@ -15826,7 +15826,7 @@ static void llama_set_inputs(llama_context & lctx, const llama_ubatch & batch) {
1582615826

1582715827
// clear unused states
1582815828
for (int i = 0; i < n_kv; ++i) {
15829-
uint32_t cell_id = i + kv_self.head;
15829+
const uint32_t cell_id = i + kv_self.head;
1583015830
llama_kv_cell & kv_cell = lctx.kv_self.cells[cell_id];
1583115831

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

0 commit comments

Comments
 (0)