]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
CUDA: fix im2col_3d to respect non-contiguous inputs (views) (#15956)
authorJake Karnes <redacted>
Mon, 15 Sep 2025 22:28:31 +0000 (16:28 -0600)
committerGitHub <redacted>
Mon, 15 Sep 2025 22:28:31 +0000 (00:28 +0200)
commit3d4053f77f0f78ee2b791088c02af653ebee42dd
tree040b3ac1b48b620b363421171e3bd11e1179770d
parentdc381aa9a6dc45f00673471d34b8bddd30e77570
CUDA: fix im2col_3d to respect non-contiguous inputs (views) (#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