Skip to content

Commit 43bcb50

Browse files
committed
squash! llama : add getters for n_threads/n_threads_batch
Rename the getters to llama_n_threads and llama_n_threads_batch. Signed-off-by: Daniel Bevenius <[email protected]>
1 parent 43f1d31 commit 43bcb50

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llama.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17183,11 +17183,11 @@ void llama_set_n_threads(struct llama_context * ctx, uint32_t n_threads, uint32_
1718317183
ctx->cparams.n_threads_batch = n_threads_batch;
1718417184
}
1718517185

17186-
uint32_t llama_get_n_threads(struct llama_context * ctx) {
17186+
uint32_t llama_n_threads(struct llama_context * ctx) {
1718717187
return ctx->cparams.n_threads;
1718817188
}
1718917189

17190-
uint32_t llama_get_n_threads_batch(struct llama_context * ctx) {
17190+
uint32_t llama_n_threads_batch(struct llama_context * ctx) {
1719117191
return ctx->cparams.n_threads_batch;
1719217192
}
1719317193

llama.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,10 +760,10 @@ extern "C" {
760760
LLAMA_API void llama_set_n_threads(struct llama_context * ctx, uint32_t n_threads, uint32_t n_threads_batch);
761761

762762
// Get the number of threads used for generation of a single token.
763-
LLAMA_API uint32_t llama_get_n_threads(struct llama_context * ctx);
763+
LLAMA_API uint32_t llama_n_threads(struct llama_context * ctx);
764764

765765
// Get the number of threads used for prompt and batch processing (multiple token).
766-
LLAMA_API uint32_t llama_get_n_threads_batch(struct llama_context * ctx);
766+
LLAMA_API uint32_t llama_n_threads_batch(struct llama_context * ctx);
767767

768768
// Set whether to use causal attention or not
769769
// If set to true, the model will only attend to the past tokens

0 commit comments

Comments
 (0)