Skip to content

[WebGPU] Fix 2D indexing for copy kernel - #32576

Merged
ggerganov merged 26 commits into
ggml-org:masterfrom
nikhilJain17:nikhilJain17/webgpu-copy-2d
Nov 20, 2026
Merged

ggerganov merged 26 commits into
ggml-org:masterfrom
nikhilJain17:nikhilJain17/webgpu-copy-2d

Conversation

@nikhilJain17

@nikhilJain17 nikhilJain17 commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Overview

The copy kernel dispatches with 2D workgroups but the kernel itself only indexes in 1D. This PR adds 2D indexing into the kernel by scaling the y dimension by the size of a row by num of threads in a workgroup * num workgroups in a row.

Additional information

Requirements

@github-actions github-actions Bot added testing Everything test related ggml changes relating to the ggml tensor library for machine learning WebGPU labels Nov 19, 2026
@nikhilJain17
nikhilJain17 marked this pull request as ready for review November 19, 2026 00:56
@nikhilJain17
nikhilJain17 requested review from a team and ggerganov as code owners November 19, 2026 00:56
@yomaytk yomaytk added the merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. label Nov 19, 2026
@ggerganov
ggerganov merged commit d7d1b63 into ggml-org:master Nov 20, 2026
31 of 32 checks passed
Kidplayer666 pushed a commit to Kidplayer666/llama.cpp that referenced this pull request Nov 20, 2026
* Only run webgpu CI on my fork

* Add webgpu only workflow

* resolve merge conflicts

* Add 2d indexing to copy kernel

* move test
Annieren pushed a commit to Annieren/llama.cpp-upstream that referenced this pull request Nov 23, 2026
* Only run webgpu CI on my fork

* Add webgpu only workflow

* resolve merge conflicts

* Add 2d indexing to copy kernel

* move test
Nindaleth pushed a commit to Nindaleth/llama.cpp that referenced this pull request Nov 26, 2026
* Only run webgpu CI on my fork

* Add webgpu only workflow

* resolve merge conflicts

* Add 2d indexing to copy kernel

* move test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. testing Everything test related WebGPU

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants