]> git.djapps.eu Git - pkg/ggml/sources/ggml/commit
metal: TRI, FILL, EXPM1, SOFTPLUS (llama/16623)
authorGabe Goodhart <redacted>
Thu, 4 Dec 2025 17:12:19 +0000 (10:12 -0700)
committerGeorgi Gerganov <redacted>
Thu, 11 Dec 2025 13:32:54 +0000 (15:32 +0200)
commit0f8cfa0f1c236808fcd4da7deb32964766c653ab
tree8a4083a709317014a2ab4876bf9139db0f2fabf0
parente6d06a77b574f55a87426d61c42f45dc80e829ff
metal: TRI, FILL, EXPM1, SOFTPLUS (llama/16623)

* feat(wip): Port initial TRI impl from pervious work

The kernel does not work and is not optimized, but the
code compiles and runs, so this will be the starting point
now that the core op has been merged.

Branch: ggml-cumsum-tri

Signed-off-by: Gabe Goodhart <redacted>
* fix: Remove argument for constant val override

This was added in the original draft, but later removed. With this, the
kernel now passes tests.

Branch: ggml-cumsum-tri

Signed-off-by: Gabe Goodhart <redacted>
* feat: Move the ttype conditional to templating to avoid conditional in kernel

Branch: ggml-cumsum-tri

Signed-off-by: Gabe Goodhart <redacted>
* fix: Type fixes

Signed-off-by: Gabe Goodhart <redacted>
Co-authored-by: Georgi Gerganov <redacted>
Co-authored-by: Georgi Gerganov <redacted>
* feat: Add softplus for metal

Branch: ggml-cumsum-tri

Signed-off-by: Gabe Goodhart <redacted>
* feat: Add EXPM1 for metal

Branch: ggml-cumsum-tri

Signed-off-by: Gabe Goodhart <redacted>
* feat: Add FILL for metal

Branch: ggml-cumsum-tri

Signed-off-by: Gabe Goodhart <redacted>
* refactor: Branchless version of tri using _ggml_vec_tri_cmp as a mask

Branch: ggml-cumsum-tri

Signed-off-by: Gabe Goodhart <redacted>
* fix: Remove unused arguments

Branch: ggml-cumsum-tri

Signed-off-by: Gabe Goodhart <redacted>
* refactor: Use select instead of branch for softplus non-vec

Branch: ggml-cumsum-tri

Signed-off-by: Gabe Goodhart <redacted>
---------

Signed-off-by: Gabe Goodhart <redacted>
Co-authored-by: Georgi Gerganov <redacted>
src/ggml-metal/ggml-metal-device.cpp
src/ggml-metal/ggml-metal-device.h
src/ggml-metal/ggml-metal-device.m
src/ggml-metal/ggml-metal-impl.h
src/ggml-metal/ggml-metal-ops.cpp
src/ggml-metal/ggml-metal-ops.h
src/ggml-metal/ggml-metal.metal