ggml-webgpu: move from parameter buffer pool to single buffer with offsets#21278
Open
reeselevine wants to merge 12 commits intoggml-org:masterfrom
Open
ggml-webgpu: move from parameter buffer pool to single buffer with offsets#21278reeselevine wants to merge 12 commits intoggml-org:masterfrom
reeselevine wants to merge 12 commits intoggml-org:masterfrom
Conversation
nikhilJain17
approved these changes
Apr 1, 2026
Contributor
nikhilJain17
left a comment
There was a problem hiding this comment.
Nice! This removes a lot of the footguns we were previously dealing with in kernel submission and waiting by getting rid of individual future handles and just waiting on the whole queue.
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
Continuing some work to simplify and make the WebGPU backend scheduling more asynchronous, I realized that we don't actually need a pool of parameter buffers. Instead we can use a single buffer with multiple offset slots, and cycle through them on a batch of submissions. This PR replaces a pool with a
webgpu_param_arena, and moves all operations to use it. Memset is special because it lives in the global context, but because it is now asynchronous it uses a single parameter buffer.Requirements