Skip to content

webgpu : add CONV_2D_DW (depthwise conv2d) kernel#25847

Open
m1el wants to merge 3 commits into
ggml-org:masterfrom
m1el:webgpu-conv2d-dw
Open

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

Conversation

@m1el

@m1el m1el commented Jul 17, 2026

Copy link
Copy Markdown

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
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
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
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