]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
ggml : fix cont with transposed tensors when one dimension is 1 (ggml/934)
authorSalvatore Mesoraca <redacted>
Wed, 28 Aug 2024 08:23:02 +0000 (10:23 +0200)
committerGeorgi Gerganov <redacted>
Sun, 8 Sep 2024 08:05:55 +0000 (11:05 +0300)
commitefe6a83e3046a94cda38c8be5a7801eadc21d78d
treecb6c5abd52c7e070f67befce7f0010c80304f6d2
parentfbb7fcffbcfc50009c275e75982b1603a6cb6b80
ggml : fix cont with transposed tensors when one dimension is 1 (ggml/934)

* ggml_cont: fix issue with transposed tensors when one dimension is 1

when using multiple threads, it is not enough
to check for the tensors to be contiguous for
ggml_compute_forward_dup_same_cont to work correctly.
The tensors strides also need to match.

Signed-off-by: Salvatore Mesoraca <redacted>
* Add ggml_cont tests

Signed-off-by: Salvatore Mesoraca <redacted>
* Remove dead code

it isn't possible to reach this code because
all these functions are invoked by ggml_compute_forward_dup
if and only if src0->type != dst->type

Signed-off-by: Salvatore Mesoraca <redacted>
* Make ggml_compute_forward_dup_same_cont work with contiguous tensors

Co-authored-by: Georgi Gerganov <redacted>
Signed-off-by: Salvatore Mesoraca <redacted>
---------

Signed-off-by: Salvatore Mesoraca <redacted>
Co-authored-by: Georgi Gerganov <redacted>
ggml/src/ggml.c
tests/test-backend-ops.cpp