Skip to content

common: migrate the deprecated --mmap/--no-mmap to --load-mode - #26934

Merged
taronaeo merged 1 commit into
ggml-org:masterfrom
fboudra:deprecated-mmap
Aug 15, 2026
Merged

common: migrate the deprecated --mmap/--no-mmap to --load-mode#26934
taronaeo merged 1 commit into
ggml-org:masterfrom
fboudra:deprecated-mmap

Conversation

@fboudra

@fboudra fboudra commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Overview

Migrate the deprecated --mmap, --no-mmap, --mlock, and --direct-io flags to the unified --load-mode argument across scripts, examples, and documentation.

Additional information

  • Updated SYCL examples, Snapdragon scripts (ADB + Windows), and benchmark scripts
  • Updated internal warning message in llama-model-loader.cpp
  • Updated env var documentation in server/README.md
  • Updated completion/README.md "Model Loading Mode" section

Requirements

Replace the deprecated --mmap, --no-mmap, --mlock, and --direct-io flags with
the unified --load-mode argument across scripts, examples, and documentation.
Internal warning message and env var docs updated accordingly.

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
@fboudra
fboudra requested review from a team and ggerganov as code owners August 11, 2026 23:14
@github-actions github-actions Bot added documentation Improvements or additions to documentation server SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language labels Aug 11, 2026
@ggml-gh-bot

ggml-gh-bot Bot commented Aug 11, 2026

Copy link
Copy Markdown

Hi @fboudra, thanks for your contribution!

Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:

  • Large PR: Large changes require prior discussion (e.g. an issue or RFC) and maintainers may not be able to review this PR as-is. Consider splitting it into smaller, focused PRs.

Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below.

@taronaeo taronaeo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! For docs that specified --mmap, by right they should default to --load-mode mmap instead of auto to prevent unwanted behaviour.

The auto mode is relatively new and I don't know if the results will be different from how the original docs wanted it to be.

@arthw arthw left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's OK to SYCL backend.
I verified it and it's passed.

Thank you!

@fboudra

fboudra commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author
* **Large PR**: Large changes require prior discussion (e.g. an issue or RFC) and maintainers may not be able to review this PR as-is. Consider splitting it into smaller, focused PRs.

The PR is large but should be easy to review with usually a one-liner per file modified.

@fboudra

fboudra commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Thanks! For docs that specified --mmap, by right they should default to --load-mode mmap instead of auto to prevent unwanted behaviour.

The auto mode is relatively new and I don't know if the results will be different from how the original docs wanted it to be.

I had myself the same question. Following #26081 , it seemed safe to map --mmap to --load-mode auto instead of --load-mode mmap. The auto mode default to mmap except on devices that don't support mmap (CUDA/ROCm and Vulkan iGPUs). Looping @0cc4m in case he has additional info on the topic. Nonetheless, I'm fine one way or another.

@0cc4m

0cc4m commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

For now auto just means mmap on most devices, none on integrated devices that can't directly use mmapped memory. In the future it may become more complex, ideally it would also pick direct-io where supported. Whatever is best for loading on a specific device.

@taronaeo

Copy link
Copy Markdown
Member

I'm seeing this CI error: https://github.com/ggml-org/llama.cpp/actions/runs/31545705425/job/94473177972?pr=26934#step:9:12948

I don't think it is caused by this PR, but I'm taking a deeper look to confirm before merging.

@taronaeo
taronaeo merged commit 0177dcc into ggml-org:master Aug 15, 2026
29 of 32 checks passed
CowboyTim pushed a commit to aardbeiplantje/llama.cpp that referenced this pull request Aug 16, 2026
…org#26934)

Replace the deprecated --mmap, --no-mmap, --mlock, and --direct-io flags with
the unified --load-mode argument across scripts, examples, and documentation.
Internal warning message and env var docs updated accordingly.

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
brittlewis12 pushed a commit to brittlewis12/llama.cpp that referenced this pull request Aug 17, 2026
…org#26934)

Replace the deprecated --mmap, --no-mmap, --mlock, and --direct-io flags with
the unified --load-mode argument across scripts, examples, and documentation.
Internal warning message and env var docs updated accordingly.

Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation server SYCL https://en.wikipedia.org/wiki/SYCL - GPU programming language

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants