]> git.djapps.eu Git - pkg/ggml/sources/ggml/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:33:50 +0000 (13:33 +0300)
commitfb1b09fe04c039788d5e814c0d55715ef108da73
tree61ab18f6a81d79f9d3ba1685aed865bfb7be4c45
parentf771037ffe29b2c666ab5716f7d5e42cde1ec746
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.
src/ggml-cpu/ops.cpp
src/ggml-cuda/tsembd.cu
src/ggml-metal/ggml-metal.metal
src/ggml-opencl/kernels/tsembd.cl
src/ggml-sycl/tsembd.cpp
src/ggml-vulkan/vulkan-shaders/timestep_embedding.comp
src/ggml.c