ggml-cuda: enable GGML_CUDA_GRAPH_OPT by default on RDNA3.5 - #56
Merged
mgehre-amd merged 1 commit intoJul 20, 2026
Merged
Conversation
The graph optimization pass was opt-in via GGML_CUDA_GRAPH_OPT=1. Default it to on for RDNA3.5 while keeping the env var as an explicit override (GGML_CUDA_GRAPH_OPT=0 disables, =1 forces on). Other archs are unchanged.
roberteg16
marked this pull request as ready for review
July 17, 2026 10:25
roberteg16
requested review from
Annieren,
jimw567,
liangliangchang and
mgehre-amd
July 17, 2026 10:26
Collaborator
|
Which graph optimizations or covered by this flag? Which impact does this have on perf? |
Author
It has nothing to do with hipGraphs, the name is a bit unfortunate. It just enables concurrent execution of ops for two graph patterns:
+7% on decode for MoE due to shared expert. I don't recall regressions for dense models |
Author
I updated PR body with a table |
Collaborator
|
Is this an alternative to #36? How do both relate? |
Author
|
Author
|
@mgehre-amd friendly ping |
mgehre-amd
approved these changes
Jul 20, 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.
Summary
ggml_backend_cuda_graph_optimize) was previously opt-in, requiringGGML_CUDA_GRAPH_OPT=1.GGML_CUDA_CC_IS_RDNA3_5) while keeping the env var as an explicit override:GGML_CUDA_GRAPH_OPT=0disables it,=1forces it on.Benchmarks
gfx1151 (RDNA3.5),
llama-bench -ngl 999 -r 40; VLM viallama-mtmd-cli(decode, 128 tokens). OFF =GGML_CUDA_GRAPH_OPT=0, ON =GGML_CUDA_GRAPH_OPT=1(new default).Models: