01Hhighconf 95%
Incorrect weight indexing in CWHN shader variant
ggml/src/ggml-webgpu/wgsl-shaders/conv2d_dw.wgsl:107
In the CWHN (contiguous-channels input) branch, the weight is indexed as params.offset_w + ky * knl_row + kx * params.channels + c. This assumes the weight is stored with channels innermost, but the weight tensor (src0) has shape [KW, KH, 1, C] and is stored in the standard contiguous (channel-major) layout: for each channel, all kernel elements are contiguous. The correct index should be params.offset_w + c * params.knl_h * params.knl_w + ky * params.knl_w + kx. The current indexing causes all reads to use wrong weight values, producing incorrect output for any CWHN input (i.e., when src1 is not contiguous but is contiguous-channels).
Suggested fix
let k = load_weight(params.offset_w + c * params.knl_h * params.knl_w + ky * params.knl_w + kx);