sampling : use pinned memory for backend sampling buffers

This commit is contained in:
Daniel Bevenius
2025-11-21 14:02:16 +01:00
parent c1625620f6
commit 61ffe41dc1
7 changed files with 358 additions and 120 deletions
+1 -1
View File
@@ -442,7 +442,7 @@ llama_token llama_sampler_sample(struct llama_sampler * smpl, struct llama_conte
const llama_token sampled_token = llama_get_backend_sampled_token_ith(ctx, idx);
const float * sampled_probs = llama_get_backend_sampled_probs_ith(ctx, idx);
const float * sampled_logits = llama_get_backend_sampled_logits_ith(ctx, idx);
const llama_token * sampled_ids = llama_get_backend_sampled_token_ids_ith(ctx, idx);
const llama_token * sampled_ids = llama_get_backend_sampled_candidates_ith(ctx, idx);
// If a backend sampler has already sampled a token, return it.
if (sampled_token != LLAMA_TOKEN_NULL) {