Add missing labels and symbols for new operators
This commit is contained in:
parent
d12088e164
commit
ad3a4ebc57
10
ggml.c
10
ggml.c
|
@ -2477,9 +2477,14 @@ static const char * GGML_OP_LABEL[GGML_OP_COUNT] = {
|
||||||
"ABS",
|
"ABS",
|
||||||
"SGN",
|
"SGN",
|
||||||
"NEG",
|
"NEG",
|
||||||
|
"EXP",
|
||||||
|
"1_MINUS_X",
|
||||||
|
"MAX",
|
||||||
|
|
||||||
"STEP",
|
"STEP",
|
||||||
"RELU",
|
"RELU",
|
||||||
"GELU",
|
"GELU",
|
||||||
|
"SIGMOID",
|
||||||
"SILU",
|
"SILU",
|
||||||
"NORM",
|
"NORM",
|
||||||
"RMS_NORM",
|
"RMS_NORM",
|
||||||
|
@ -2521,9 +2526,14 @@ static const char * GGML_OP_SYMBOL[GGML_OP_COUNT] = {
|
||||||
"abs(x)",
|
"abs(x)",
|
||||||
"sgn(x)",
|
"sgn(x)",
|
||||||
"-x",
|
"-x",
|
||||||
|
"e^x",
|
||||||
|
"1-x",
|
||||||
|
"max(x,y)",
|
||||||
|
|
||||||
"step(x)",
|
"step(x)",
|
||||||
"relu(x)",
|
"relu(x)",
|
||||||
"gelu(x)",
|
"gelu(x)",
|
||||||
|
"sigmoid(x)",
|
||||||
"silu(x)",
|
"silu(x)",
|
||||||
"norm(x)",
|
"norm(x)",
|
||||||
"rms_norm(x)",
|
"rms_norm(x)",
|
||||||
|
|
3
ggml.h
3
ggml.h
|
@ -186,7 +186,8 @@
|
||||||
// - to `ggml_compute_forward` and call the forward dispatch function here.
|
// - to `ggml_compute_forward` and call the forward dispatch function here.
|
||||||
// - to `ggml_compute_backward` and add `GGML_ASSERT(false)` here.
|
// - to `ggml_compute_backward` and add `GGML_ASSERT(false)` here.
|
||||||
// - to `ggml_graph_compute` and add `node->n_tasks = 1` here.
|
// - to `ggml_graph_compute` and add `node->n_tasks = 1` here.
|
||||||
// 6. Fix all assertions that check value of `GGML_OP_COUNT`: you've added 1 operator, so increment asserted value by one.
|
// 6. Add operator label to `GGML_OP_LABEL` array and operator symbol to `GGML_OP_SYMBOL` array.
|
||||||
|
// 7. Fix all assertions that check value of `GGML_OP_COUNT`: you've added 1 operator, so increment asserted value by one.
|
||||||
//
|
//
|
||||||
// When in doubt, consult the code of existing operators similar to that you're implementing.
|
// When in doubt, consult the code of existing operators similar to that you're implementing.
|
||||||
// Resulting operator would work for the forward pass, but will lack backward implementation and multi-threading support.
|
// Resulting operator would work for the forward pass, but will lack backward implementation and multi-threading support.
|
||||||
|
|
Loading…
Reference in New Issue