hexagon: make vmem and buffer-size configurable#22487
Merged
max-krasnyansky merged 9 commits intoggml-org:masterfrom Apr 29, 2026
Merged
hexagon: make vmem and buffer-size configurable#22487max-krasnyansky merged 9 commits intoggml-org:masterfrom
max-krasnyansky merged 9 commits intoggml-org:masterfrom
Conversation
We use a sane default but it's helpful to allow for an override if needed.
… management to host
…eanup in that area
lhez
approved these changes
Apr 28, 2026
Member
Author
|
@ggml-org/maintainers can I get a second approval please. |
ServeurpersoCom
approved these changes
Apr 29, 2026
Co-authored-by: Pascal <admin@serveurperso.com>
Member
Author
|
@lhez can you please re-approve (stale again after merging suggestions) |
lhez
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This PR adds two new knobs to the Hexagon backend
GGML_HEXAGON_VMEMAllows for overriding default VMEM limit. The default is the same as before (around 3.2GB)
If set to 0 the backend will try to measure it by pre-mmaping the buffers
GGML_HEXAGON_MBUFAllows for overriding default buffer. The default is the same as before (1GB)
This might be handy on the IOT devices where the allocator might struggle with 1GB DMA buffers
I also streamlined mapping management a bit further (pinned mappings are now managed directly by the host, etc) and updated logging in the related areas.
Requirements