Skip to content

Commit ac81e42

Browse files
reeselevineggerganov
authored andcommitted
ggml webgpu: add support for soft_max, optimize rms_norm (ggml-org#16357)
* Add inplace softmax * Move rms_norm to split row approach * Update debug for supports_op * clean up debug statements * Update tests/test-backend-ops.cpp Co-authored-by: Georgi Gerganov <ggerganov@gmail.com> --------- Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
1 parent 2401dea commit ac81e42

File tree

6 files changed

+565
-47
lines changed

6 files changed

+565
-47
lines changed

ggml/include/ggml.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1681,6 +1681,13 @@ extern "C" {
16811681
float scale,
16821682
float max_bias);
16831683

1684+
GGML_API struct ggml_tensor * ggml_soft_max_ext_inplace(
1685+
struct ggml_context * ctx,
1686+
struct ggml_tensor * a,
1687+
struct ggml_tensor * mask,
1688+
float scale,
1689+
float max_bias);
1690+
16841691
GGML_API void ggml_soft_max_add_sinks(
16851692
struct ggml_tensor * a,
16861693
struct ggml_tensor * sinks);

0 commit comments

Comments
 (0)