]> git.djapps.eu Git - pkg/ggml/sources/ggml/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:33:50 +0000 (13:33 +0300)
commitf771037ffe29b2c666ab5716f7d5e42cde1ec746
treedc7ff1650414a7c1a9f5060ac964654a74361a51
parent6cd764a3740830b0b333959fe63fa4e99e84b736
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>
src/ggml-cuda/im2col.cu