Skip to content

Add WebGPU support for 3D im2col - #1203

Merged
0xShug0 merged 1 commit into
mainfrom
feature/webgpu-im2col-3d
Nov 5, 2026
Merged

0xShug0 merged 1 commit into
mainfrom
feature/webgpu-im2col-3d

Conversation

@0xShug0

@0xShug0 0xShug0 commented Nov 5, 2026

Copy link
Copy Markdown
Owner

WebGPU currently rejects GGML_OP_IM2COL_3D. This adds a dedicated WGSL implementation for F32 input with F32 or F16 output, covering batches, padding, stride, dilation, and strided input views with nonzero offsets.

The shader writes contiguous output elements, reuses cached pipelines, and uses the existing multi-dimensional workgroup dispatch helper. Existing IM2COL paths and other backends are unchanged. Tensor storage-buffer limits remain unchanged.

Validation:

  • Native Debug and WASM64 Debug builds pass.
  • 2,059 CPU-reference correctness cases pass. Eleven focused cases also pass with zero-error tolerance, including F16 output, non-cubic kernels, batched strided views, nonzero offsets, and dispatches exceeding one workgroup dimension.
  • Add correctness and operator-performance cases to the existing GGML backend test suite.

RTX 5090, native Dawn WebGPU, repeated GGML operator benchmark; 21,233,664 output elements:

Output type Time per operation
F32 0.111 ms
F16 0.103 ms

No model, framework, or demo files are included.

@0xShug0
0xShug0 merged commit fb3ddc9 into main Nov 5, 2026
7 checks passed
@0xShug0
0xShug0 deleted the feature/webgpu-im2col-3d branch November 5, 2026 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant