Skip to content

Commit 389ac78

Browse files
pwilkinggerganovslarenam17anCISC
authored
ggml : add ops SOFTPLUS, EXPM1, TRI, SOLVE_TRI, CUMSUM (#17063)
* Add ops needed for new hybrid models: SOFTPLUS, EXPM1, TRI, SOLVE_TRI, CUMSUM * Update ggml/include/ggml.h Co-authored-by: Georgi Gerganov <[email protected]> * Update tests/test-backend-ops.cpp Co-authored-by: Georgi Gerganov <[email protected]> * Code review * Whitespace * Update tests/test-backend-ops.cpp Co-authored-by: Diego Devesa <[email protected]> * This is actually sigmoid, duh. * Add CONST, remove TRI_KEEP, other changes from review * Update tests/test-backend-ops.cpp Co-authored-by: Georgi Gerganov <[email protected]> * Update ggml/src/ggml.c Co-authored-by: Georgi Gerganov <[email protected]> * Update ggml/src/ggml.c Co-authored-by: Georgi Gerganov <[email protected]> * Update ggml/src/ggml-cuda/unary.cu Co-authored-by: Aman Gupta <[email protected]> * Remove extra script * Update ggml/src/ggml.c Co-authored-by: Diego Devesa <[email protected]> * Update tests/test-backend-ops.cpp Co-authored-by: Diego Devesa <[email protected]> * moving changes from laptop [no ci] * pre-rebase * Update tests/test-backend-ops.cpp Co-authored-by: Sigbjørn Skjæret <[email protected]> * Update tests/test-backend-ops.cpp Co-authored-by: Sigbjørn Skjæret <[email protected]> * Refactor tests * ggml : cleanup * cont : fix ggml_fill srcs * tests : add note * ggml : add ggml_fill_inplace * ggml : add asserts * ggml : fix ggml_fill constant cast * cont : ggml_tri minor * Use TENSOR_LOCALS * Fix regression from #14596, regenerate * Don't make commits at night... --------- Co-authored-by: Georgi Gerganov <[email protected]> Co-authored-by: Diego Devesa <[email protected]> Co-authored-by: Aman Gupta <[email protected]> Co-authored-by: Sigbjørn Skjæret <[email protected]>
1 parent a19bd6f commit 389ac78

File tree

16 files changed

+33051
-12051
lines changed

16 files changed

+33051
-12051
lines changed

docs/ops.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,32 @@ Legend:
1818
| ACC ||||||||||
1919
| ADD ||||| 🟡 | 🟡 ||||
2020
| ADD1 ||||||||||
21-
| ADD_ID ||| | ||||||
21+
| ADD_ID ||| | ||||||
2222
| ARANGE ||||||||||
2323
| ARGMAX ||||||||||
2424
| ARGSORT ||||||||||
2525
| CEIL |||| 🟡 ||| 🟡 |||
2626
| CLAMP ||||| 🟡 | 🟡 || 🟡 ||
2727
| CONCAT |||| 🟡 || 🟡 ||||
2828
| CONT || 🟡 |||| 🟡 | 🟡 | 🟡 ||
29-
| CONV_2D |||| 🟡 ||||||
29+
| CONV_2D |||| ||||||
3030
| CONV_2D_DW ||||||||||
31-
| CONV_3D ||| |||||||
31+
| CONV_3D ||| |||||||
3232
| CONV_TRANSPOSE_1D ||||||||||
3333
| CONV_TRANSPOSE_2D ||||||||||
3434
| COS ||||| 🟡 ||| 🟡 ||
3535
| COUNT_EQUAL ||||||||||
3636
| CPY || 🟡 | 🟡 | 🟡 | 🟡 | 🟡 | 🟡 | 🟡 ||
3737
| CROSS_ENTROPY_LOSS ||||||||||
3838
| CROSS_ENTROPY_LOSS_BACK ||||||||||
39+
| CUMSUM ||||||||||
3940
| DIAG_MASK_INF ||||| 🟡 | 🟡 ||||
4041
| DIV ||||| 🟡 | 🟡 ||||
4142
| DUP |||| 🟡 | 🟡 | 🟡 || 🟡 ||
4243
| ELU |||| 🟡 | 🟡 || 🟡 |||
4344
| EXP |||| 🟡 | 🟡 || 🟡 |||
45+
| EXPM1 |||| 🟡 ||||||
46+
| FILL ||||||||||
4447
| FLASH_ATTN_EXT || 🟡 || 🟡 | 🟡 ||| 🟡 ||
4548
| FLOOR |||| 🟡 ||| 🟡 |||
4649
| GATED_LINEAR_ATTN ||||||||||
@@ -57,7 +60,7 @@ Legend:
5760
| HARDSIGMOID |||| 🟡 | 🟡 || 🟡 |||
5861
| HARDSWISH |||| 🟡 | 🟡 || 🟡 |||
5962
| IM2COL ||||| 🟡 |||||
60-
| IM2COL_3D ||| | ||||||
63+
| IM2COL_3D ||| | ||||||
6164
| L2_NORM ||||||||||
6265
| LEAKY_RELU ||||||||||
6366
| LOG ||||||||||
@@ -69,48 +72,51 @@ Legend:
6972
| NORM ||||| 🟡 ||| 🟡 ||
7073
| NORM_MUL_ADD ||||||||||
7174
| OPT_STEP_ADAMW ||||||||||
72-
| OPT_STEP_SGD ||| | ||||||
75+
| OPT_STEP_SGD ||| | ||||||
7376
| OUT_PROD | 🟡 || 🟡 | 🟡 ||| 🟡 |||
74-
| PAD |||| ||| 🟡 |||
75-
| PAD_REFLECT_1D |||| ||||||
77+
| PAD |||| 🟡 ||| 🟡 |||
78+
| PAD_REFLECT_1D |||| ||||||
7679
| POOL_2D || 🟡 ||||||||
7780
| REGLU ||||| 🟡 ||| 🟡 ||
7881
| RELU |||| 🟡 | 🟡 | 🟡 | 🟡 | 🟡 ||
7982
| REPEAT |||| 🟡 || 🟡 || 🟡 ||
8083
| REPEAT_BACK ||||||||||
8184
| RMS_NORM ||||| 🟡 |||||
8285
| RMS_NORM_BACK ||||||||||
83-
| RMS_NORM_MUL_ADD ||| | ||||||
84-
| ROLL |||| ||||||
86+
| RMS_NORM_MUL_ADD ||| | ||||||
87+
| ROLL |||| ||||||
8588
| ROPE || 🟡 ||||||||
8689
| ROPE_BACK ||||||||||
8790
| ROUND |||| 🟡 ||| 🟡 |||
8891
| RWKV_WKV6 ||||||||||
8992
| RWKV_WKV7 ||||||||||
9093
| SCALE || 🟡 ||||||||
91-
| SET |||| ||| 🟡 |||
94+
| SET |||| ||| 🟡 |||
9295
| SET_ROWS ||| 🟡 | 🟡 | 🟡 | 🟡 | 🟡 | 🟡 ||
9396
| SGN |||| 🟡 | 🟡 || 🟡 |||
9497
| SIGMOID |||| 🟡 | 🟡 | 🟡 | 🟡 | 🟡 ||
9598
| SILU |||| 🟡 | 🟡 | 🟡 | 🟡 | 🟡 ||
9699
| SILU_BACK ||||||||||
97100
| SIN ||||| 🟡 ||| 🟡 ||
98101
| SOFTCAP ||||||||||
102+
| SOFTPLUS |||| 🟡 ||||||
99103
| SOFT_MAX || 🟡 ||||||||
100104
| SOFT_MAX_BACK ||| 🟡 | 🟡 ||| 🟡 |||
105+
| SOLVE_TRI ||||||||||
101106
| SQR ||||| 🟡 ||| 🟡 ||
102107
| SQRT ||||| 🟡 |||||
103108
| SSM_CONV ||||||||||
104109
| SSM_SCAN ||||||||||
105110
| STEP |||| 🟡 | 🟡 || 🟡 |||
106111
| SUB ||||| 🟡 | 🟡 ||||
107-
| SUM |||| ||| 🟡 |||
108-
| SUM_ROWS |||| ||| 🟡 |||
112+
| SUM |||| 🟡 ||| 🟡 |||
113+
| SUM_ROWS |||| 🟡 ||| 🟡 |||
109114
| SWIGLU ||||| 🟡 ||| 🟡 ||
110-
| SWIGLU_OAI ||| | ||||||
115+
| SWIGLU_OAI ||| | ||||||
111116
| TANH |||| 🟡 | 🟡 || 🟡 | 🟡 ||
112117
| TIMESTEP_EMBEDDING ||||||||||
113118
| TOPK_MOE ||||||||||
119+
| TRI ||||||||||
114120
| TRUNC |||| 🟡 ||| 🟡 |||
115121
| UPSCALE || 🟡 ||| 🟡 || 🟡 |||
116-
| XIELU ||| |||||||
122+
| XIELU ||| |||||||

0 commit comments

Comments
 (0)