Skip to content

Commit f732003

Browse files
ngxsonggerganov
andauthored
Apply suggestions from code review
Co-authored-by: Georgi Gerganov <[email protected]>
1 parent 11b1564 commit f732003

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/llama.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17170,7 +17170,7 @@ static int llama_decode_internal(
1717017170

1717117171
// temporary allocate memory for the input batch if needed
1717217172
llama_batch_allocr batch_allocr(lctx, inp_batch);
17173-
llama_batch batch = batch_allocr.batch;
17173+
const llama_batch & batch = batch_allocr.batch;
1717417174
const uint32_t n_tokens_all = batch.n_tokens;
1717517175

1717617176
const auto & model = lctx.model;
@@ -17488,7 +17488,7 @@ static int llama_encode_internal(
1748817488

1748917489
// temporary allocate memory for the input batch if needed
1749017490
llama_batch_allocr batch_allocr(lctx, inp_batch);
17491-
llama_batch batch = batch_allocr.batch;
17491+
const llama_batch & batch = batch_allocr.batch;
1749217492
const uint32_t n_tokens = batch.n_tokens;
1749317493

1749417494
const auto & model = lctx.model;

0 commit comments

Comments
 (0)