]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
CUDA: fix im2col_3d to respect non-contiguous inputs (views) (llama/15956)
authorJake Karnes <redacted>
Mon, 15 Sep 2025 22:28:31 +0000 (16:28 -0600)
committerGeorgi Gerganov <redacted>
Sat, 20 Sep 2025 10:45:30 +0000 (13:45 +0300)
commitf72ec185fbf9cf3b6b94cb76360ddedcc4355474
treee9ca8f09886b804941f8ba23fce14bda67f9daad
parenta642b533a45c183ddcf6b4ec919a95a584e1bb12
CUDA: fix im2col_3d to respect non-contiguous inputs (views) (llama/15956)

* fix im2col_3d to respect non-contiguous inputs (views)

The CUDA 3D im2col kernel computed source addresses assuming compact layout (products of dims), ignoring nb[] strides.

This patch switches im2col_3d source indexing to use true strides derived from src1->nb[] (in elements), mirroring the approach used in the 2D CUDA im2col path. Destination indexing is unchanged.

* use ggml_element_size() for src strides

Co-authored-by: Johannes Gäßler <redacted>
---------

Co-authored-by: Johannes Gäßler <redacted>
ggml/src/ggml-cuda/im2col.cu