]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
ggml : fix padding in timestep embedding kernels (llama/15932)
authorDaniel Bevenius <redacted>
Tue, 16 Sep 2025 13:25:57 +0000 (15:25 +0200)
committerGeorgi Gerganov <redacted>
Sat, 20 Sep 2025 10:45:30 +0000 (13:45 +0300)
commit5c524bb8790b9ce92b3c9338154d8d243c620b5e
treec175c4a928c9795271123abab3ce2e6ccb766538
parentf72ec185fbf9cf3b6b94cb76360ddedcc4355474
ggml : fix padding in timestep embedding kernels (llama/15932)

* ggml : remove adding extra dim timestep embedding

This commit updates the ggml_timestep_embedding function to no longer
add an extra dimension when the specified dimension is odd.

The motivation for this change is that this introduces an unnecessary
dimension when the dimension is odd, which caused an issue in the
kernels which were not expecting this extra dimension and it resulted in
uninitialized memory for the second to last dimension.

* ggml-cuda : fix padding in timestep embedding kernel

This commit removes the zeroing out of the last dimension now that we
are not adding the extra padding dimension.

* ggml-metal : fix padding in timestep embedding kernel

This commit fixes the zero padding for odd dimensions in
the timestep embedding kernel

* ggml-opencl : fix padding in timestep embedding kernel

This commit fixes the zero padding for odd dimensions in
the timestep embedding kernel.

* ggml-sycl : fix padding in timestep embedding kernel

This commit fixes the zero padding for odd dimensions in
the timestep embedding kernel.

* ggml-vulkan : fix padding in timestep embedding kernel

This commit fixes the zero padding for odd dimensions in
the timestep embedding kernel.

* ggml-cpu : fix padding in timestep embedding function

This commit removes the zeroing out of the last dimension now that we
are not adding the extra padding dimension.
ggml/src/ggml-cpu/ops.cpp
ggml/src/ggml-cuda/tsembd.cu
ggml/src/ggml-metal/ggml-metal.metal
ggml/src/ggml-opencl/kernels/tsembd.cl
ggml/src/ggml-sycl/tsembd.cpp
ggml/src/ggml-vulkan/vulkan-shaders/timestep_embedding.comp
ggml/src/ggml.c