common : default GPU_MAX_HW_QUEUES=1 on HIP to fix idle GPU load - #24237
Closed
liminfei-amd wants to merge 1 commit into
Closed
common : default GPU_MAX_HW_QUEUES=1 on HIP to fix idle GPU load#24237liminfei-amd wants to merge 1 commit into
liminfei-amd wants to merge 1 commit into
Conversation
On HIP/ROCm, llama-server with --mmproj can leave the GPU pinned at high utilization and maximum clocks while all slots are idle, due to a ROCm/amdgpu MES multi-queue behavior (see ggml-org#3929, ggml-org#21430, ggml-org#23965). Limiting the number of hardware queues to 1 avoids the idle busy-loop. Default GPU_MAX_HW_QUEUES to 1 in common_init() for HIP builds when the user has not set it; an explicit value is always respected. Non-HIP builds are unaffected. Fixes ggml-org#23965 Signed-off-by: liminfei-amd <91481003+liminfei-amd@users.noreply.github.com>
This was referenced Jun 11, 2026
Contributor
Author
|
Friendly ping on this one. The original reporter (@zzgundam) has since tested this change and confirmed it resolves the issue: they closed #23965 as completed, noting that "#24237 just fixed this problem". The change is a small, HIP-only default ( Thanks! |
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
On HIP/ROCm,
llama-serverwith--mmprojcan leave the GPU pinned at high utilization andmaximum core clock while all slots are idle. This is a known ROCm/amdgpu MES multi-queue behavior
(see #3929, #21430) and is reported for the mmproj idle case in #23965. Limiting the number of HW
queues to 1 avoids the idle busy-loop.
In
common_init(), for HIP builds only, defaultGPU_MAX_HW_QUEUESto1when the user hasnot already set it. An explicitly-set value is always respected; non-HIP builds are untouched:
Fixes #23965.
Additional information
Validated on real AMD ROCm hardware:
--mmproj, an idle server holds the core clock at ~3.2 GHz.majority of samples (a single transient boost spike is normal).
Note on the approach: this sets an environment default rather than changing mmproj logic. If
maintainers prefer documenting
GPU_MAX_HW_QUEUES=1for ROCm consumer GPUs instead of a codedefault, I'm glad to switch to a docs-only change.
Requirements
code paths and drafting wording). I authored and reviewed the change, understand it fully, and can
explain every line; the fix and the on-hardware validation are mine. No AI-written code was
submitted without manual review.