Skip to content

llama : split llama_prefetch() into merge and prefetch steps - #30532

Merged
angt merged 2 commits into
ggml-org:masterfrom
angt:llama-split-llama_prefetch-into-merge-and-prefetch-steps
Oct 15, 2026
Merged

angt merged 2 commits into
ggml-org:masterfrom
angt:llama-split-llama_prefetch-into-merge-and-prefetch-steps

Conversation

@angt

@angt angt commented Oct 14, 2026

Copy link
Copy Markdown
Member

Overview

Merge the ranges first, then call the system functions.

This fixes -Wunreachable-code-return on Windows.

Additional information

src/llama-mmap.cpp:894:17: warning: 'return' will never be executed [-Wunreachable-code-return]
  894 |                 return;
      |                 ^~~~~~
1 warning generated.

Requirements

Merge the ranges first, then call the system functions.

This fixes -Wunreachable-code-return on Windows.

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
@angt
angt requested a review from ggerganov as a code owner October 14, 2026 16:35
@ggerganov
ggerganov requested a review from am17an October 14, 2026 16:38
Signed-off-by: Adrien Gallouët <angt@huggingface.co>

@ggerganov ggerganov 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.

Tested on linux - no regressions.

@angt
angt merged commit 68ac765 into ggml-org:master Oct 15, 2026
12 checks passed
edwardyoon pushed a commit to edwardyoon/focus-llama that referenced this pull request Oct 24, 2026
…g#30532)

* llama : split llama_prefetch() into merge and prefetch steps

Merge the ranges first, then call the system functions.

This fixes -Wunreachable-code-return on Windows.

Signed-off-by: Adrien Gallouët <angt@huggingface.co>

* Use const_cast

Signed-off-by: Adrien Gallouët <angt@huggingface.co>

---------

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
auRose94 pushed a commit to auRose94/llama.cpp that referenced this pull request Oct 28, 2026
…g#30532)

* llama : split llama_prefetch() into merge and prefetch steps

Merge the ranges first, then call the system functions.

This fixes -Wunreachable-code-return on Windows.

Signed-off-by: Adrien Gallouët <angt@huggingface.co>

* Use const_cast

Signed-off-by: Adrien Gallouët <angt@huggingface.co>

---------

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants