]> git.djapps.eu Git - pkg/ggml/sources/whisper.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>
Mon, 2 Sep 2024 12:24:50 +0000 (15:24 +0300)
commit4a4a52bf98288f36925d135b63bef77a96752776
tree71be1d1d5ca2965916b66c06bc1104c219dec84a
parentc96906d84dd6a1c40ea797ad542df3a0c47307a3
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