Do not override mmap if GGML_CUDA_NO_PINNED is set (#1546)

This commit is contained in:
Kawrakow 2026-03-29 08:04:43 +02:00 committed by GitHub
parent c050bb9f3f
commit 7831c69e27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -3945,7 +3945,9 @@ bool create_tensors_helper::create_tensors() {
throw std::runtime_error("unknown architecture");
}
use_mmap_buffer &= !has_buft_overrides;
if (getenv("GGML_CUDA_NO_PINNED") == nullptr) {
use_mmap_buffer &= !has_buft_overrides;
}
if (model.split_mode == LLAMA_SPLIT_MODE_GRAPH || model.split_mode == LLAMA_SPLIT_MODE_ATTN) {
const int n_layer = model.mtp ? model.layers.size()