Skip to main content

Module conv2d

Module conv2d 

Source
Expand description

Vulkan dispatch wrappers for 2-D convolution, per dtype.

Functions§

conv2d_bf16
Conv2D bf16 via im2col_bf16 + cooperative-matrix bf16 matmul. Same shape contract as the f32 path; activations + weights + output all bf16. COOP-ONLY shape constraints: c_out % 16 == 0 AND (h_out * w_out) % 16 == 0. Bails on small shapes — route picker should fall through to f32 conv2d via Cast.
conv2d_f16
Conv2D f16 — sibling of conv2d_bf16. Reuses the bf16 im2col shader (2-byte shuffle is dtype-opaque) + matmul_coop_f16_f16_f16.
conv2d_f32
conv2d_f32 kernel-binding wrapper: takes the executor’s inputs, outputs, layouts and OpParams and runs the Vulkan kernel for that op and dtype.