Skip to content

webgpu : add CONV_2D_DW (depthwise conv2d) kernel#25847

Merged
yomaytk merged 3 commits into
ggml-org:masterfrom
m1el:webgpu-conv2d-dw
Jul 22, 2026
Merged

webgpu : add CONV_2D_DW (depthwise conv2d) kernel#25847
yomaytk merged 3 commits into
ggml-org:masterfrom
m1el:webgpu-conv2d-dw

Conversation

@m1el

@m1el m1el commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Implement GGML_OP_CONV_2D_DW for the WebGPU backend, ported from the Vulkan backend's conv2d_dw.comp.

Assisted-by: Claude Opus-4.8

Overview

Addresses #14909

This PR implements GGML_OP_CONV_2D_DW for the WebGPU backend.
One of my projects based on ggml requires depthwise conv2d.
It's possible to work around this by implementing this function using other primitives. Having feature parity between the backends is a better solution.

Additional information

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: YES.
    Claude-4.8 was used to port the shader from vulkan to wgsl.
    The work performed is mostly mechanical translation from one language to another.
    I have read the code and understood it. I am ready to talk about the code if need to show my understanding.

@m1el
m1el requested a review from a team as a code owner July 17, 2026 21:52
@github-actions github-actions Bot added ggml changes relating to the ggml tensor library for machine learning WebGPU labels Jul 17, 2026
@m1el
m1el force-pushed the webgpu-conv2d-dw branch from 43f9a60 to 6ebe900 Compare July 17, 2026 22:07
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jul 17, 2026
Implement GGML_OP_CONV_2D_DW for the WebGPU backend,
ported from the Vulkan backend's conv2d_dw.comp.

Assisted-by: Claude Opus-4.8
@m1el
m1el force-pushed the webgpu-conv2d-dw branch from 6ebe900 to c63ccc4 Compare July 18, 2026 14:34
Comment thread ggml/src/ggml-webgpu/wgsl-shaders/conv2d_dw.wgsl
@yomaytk

yomaytk commented Jul 19, 2026

Copy link
Copy Markdown
Member

Thanks! but we should update docs/ops.md when new ops are added, so could you update it? Please see the description in ops.md.

Comment thread ggml/src/ggml-webgpu/ggml-webgpu-shader-lib.hpp Outdated
@m1el

m1el commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

I did attempt updating the docs/ops.md as described. The issue I've had is it is a bit outdated, so the table change is huge.
I'll commit the updated support matrix, tell me later if you want the change.

@m1el

m1el commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Regenerated docs/ops/*, but the diff is now quite bloated.
I updated as many backends as I could because new ops were added and because I have access to those backends.

@m1el
m1el requested a review from yomaytk July 20, 2026 23:53
@yomaytk

yomaytk commented Jul 21, 2026

Copy link
Copy Markdown
Member

Ideally, each CSV should completely reflect the actual status of the ops implementation across all backends. But for this PR, I think updating only WebGPU.csv is enough — could you only update that file?

@m1el
m1el force-pushed the webgpu-conv2d-dw branch from 93bd156 to c37d73d Compare July 21, 2026 02:31
@m1el

m1el commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Only updating WebGPU.csv, regenerated docs, done.

@yomaytk

yomaytk commented Jul 21, 2026

Copy link
Copy Markdown
Member

Some CI tests failed, but they don't seem to be related to this change.

@reeselevine, thanks for working on #25943 and #25931. These PRs seem to address those failures — is that right?

@reeselevine

Copy link
Copy Markdown
Contributor

@yomaytk yep I'm trying to get the tests passing again in those PRs :)

@yomaytk
yomaytk merged commit 7347430 into ggml-org:master Jul 22, 2026
24 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ggml changes relating to the ggml tensor library for machine learning WebGPU

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants