vulkan : support conv-2d with large output size#17685
Merged
0cc4m merged 1 commit intoggml-org:masterfrom Dec 5, 2025
Merged
Conversation
jeffbolznv
approved these changes
Dec 2, 2025
Collaborator
jeffbolznv
left a comment
There was a problem hiding this comment.
LGTM. I also tested for perf/correctness and it was fine.
JayZenith
pushed a commit
to JayZenith/llama.cpp
that referenced
this pull request
Dec 7, 2025
0Marble
pushed a commit
to 0Marble/llama.cpp
that referenced
this pull request
Dec 18, 2025
Anico2
added a commit
to Anico2/llama.cpp
that referenced
this pull request
Jan 15, 2026
blime4
referenced
this pull request
in blime4/llama.cpp
Feb 5, 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.
The main goal is to support convolutions with large output spatial size. Currently number of
NPQ=N*OH*OWblocks is limited bymaxComputeWorkGroupCount[1]which is typically 2^16. Depending on block size this means ~2M / 8M / 16M elements. 2M elements is not a lot and exceeded by eg. a 1536x1536 image.Selecting a larger NPQ block size pushes the limit a bit, but even 16M elements doesn't feel comfortable, so I split the workgroups between y & z.
I reorganized code a bit to make pipeline selection not depend on computing the workgroup count, that makes it easier to calculate the split without being affected by blocks shape.
Also cleaned up some obsolete stuff:
conv2d_transpose_push_constants, it's the same as regular conv2d nowNo changes to actual logic apart from the y/z split. Performance looks unchanged.