Skip to content

common : throttle download progress output to reduce IO flush - #17427

Merged
ggerganov merged 1 commit into
ggml-org:masterfrom
angt:common-throttle-download-progress-output-to-reduce-io-flush
Nov 30, 2025
Merged

common : throttle download progress output to reduce IO flush#17427
ggerganov merged 1 commit into
ggml-org:masterfrom
angt:common-throttle-download-progress-output-to-reduce-io-flush

Conversation

@angt

@angt angt commented Nov 21, 2025

Copy link
Copy Markdown
Member

This change limits progress updates to approximately every 0.1% of the file size to minimize stdio overhead.

Also fixes compiler warnings regarding __func__ in lambdas.

Comment thread common/download.cpp Outdated
This change limits progress updates to approximately every 0.1% of the
file size to minimize stdio overhead.

Also fixes compiler warnings regarding __func__ in lambdas.

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
@angt
angt force-pushed the common-throttle-download-progress-output-to-reduce-io-flush branch from 5e49b30 to 3fc9f54 Compare November 28, 2025 14:43
@taronaeo

Copy link
Copy Markdown
Member

By any chance, do you have merge permissions? Otherwise I can help to merge this PR

Comment thread common/download.cpp

std::atomic<size_t> downloaded{existing_size};
const char * func = __func__; // avoid __func__ inside a lambda
size_t downloaded = existing_size;

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.

Any reason that this was std::atomic<size_t> before?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I have no idea, maybe to be safer than needed. I noticed it was useless when adding progress_step.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this is OK to merge if you confirm that the atomic was not important here.

We can re-implement it once we move the progress tracking to a higher scope though (i.e. shared among threads). This will be important once we implement the model download function in llama-server

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes absolutely useless

@angt

angt commented Nov 29, 2025

Copy link
Copy Markdown
Member Author

By any chance, do you have merge permissions? Otherwise I can help to merge this PR

Thanks @taronaeo, I don't have merge permissions, but I’m not sure I've fully convinced @ggerganov about the atomic yet 😂

@ggerganov
ggerganov merged commit beb1f0c into ggml-org:master Nov 30, 2025
72 of 74 checks passed
Anico2 added a commit to Anico2/llama.cpp that referenced this pull request Jan 15, 2026
…rg#17427)

This change limits progress updates to approximately every 0.1% of the
file size to minimize stdio overhead.

Also fixes compiler warnings regarding __func__ in lambdas.

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
blime4 referenced this pull request in blime4/llama.cpp Feb 5, 2026
This change limits progress updates to approximately every 0.1% of the
file size to minimize stdio overhead.

Also fixes compiler warnings regarding __func__ in lambdas.

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
Seunghhon pushed a commit to Seunghhon/llama.cpp that referenced this pull request Apr 26, 2026
…rg#17427)

This change limits progress updates to approximately every 0.1% of the
file size to minimize stdio overhead.

Also fixes compiler warnings regarding __func__ in lambdas.

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
ljubomirj pushed a commit to ljubomirj/llama.cpp that referenced this pull request May 6, 2026
…rg#17427)

This change limits progress updates to approximately every 0.1% of the
file size to minimize stdio overhead.

Also fixes compiler warnings regarding __func__ in lambdas.

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
…rg#17427)

This change limits progress updates to approximately every 0.1% of the
file size to minimize stdio overhead.

Also fixes compiler warnings regarding __func__ in lambdas.

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
my-other-github-account pushed a commit to my-other-github-account/llama.cpp that referenced this pull request May 15, 2026
…rg#17427)

This change limits progress updates to approximately every 0.1% of the
file size to minimize stdio overhead.

Also fixes compiler warnings regarding __func__ in lambdas.

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
phibya pushed a commit to ziee-ai/llama.cpp that referenced this pull request May 29, 2026
…rg#17427)

This change limits progress updates to approximately every 0.1% of the
file size to minimize stdio overhead.

Also fixes compiler warnings regarding __func__ in lambdas.

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
fewtarius pushed a commit to fewtarius/CachyLLama that referenced this pull request May 30, 2026
…rg#17427)

This change limits progress updates to approximately every 0.1% of the
file size to minimize stdio overhead.

Also fixes compiler warnings regarding __func__ in lambdas.

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
fukuro-kun pushed a commit to fukuro-kun/fukuro-llama-cpp-turboquant that referenced this pull request Jul 5, 2026
…rg#17427)

This change limits progress updates to approximately every 0.1% of the
file size to minimize stdio overhead.

Also fixes compiler warnings regarding __func__ in lambdas.

Signed-off-by: Adrien Gallouët <angt@huggingface.co>
MrLordCat referenced this pull request in MrLordCat/llama.cpp-with-GUI Jul 16, 2026
This change limits progress updates to approximately every 0.1% of the
file size to minimize stdio overhead.

Also fixes compiler warnings regarding __func__ in lambdas.

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