Skip to content

Commit 7e075be

Browse files
authored
special case gated ops
1 parent 6fe7e07 commit 7e075be

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/test-backend-ops.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,16 @@ struct test_unary : public test_case {
10721072
ggml_set_name(a, "a");
10731073
}
10741074

1075-
ggml_tensor * out = ggml_unary(ctx, a, op);
1075+
ggml_tensor * out;
1076+
if (op == GGML_UNARY_OP_REGLU) {
1077+
out = ggml_reglu(ctx, a);
1078+
} else if (op == GGML_UNARY_OP_GEGLU) {
1079+
out = ggml_geglu(ctx, a);
1080+
} else if (op == GGML_UNARY_OP_SWIGLU) {
1081+
out = ggml_swiglu(ctx, a);
1082+
} else {
1083+
out = ggml_unary(ctx, a, op);
1084+
}
10761085
ggml_set_name(out, "out");
10771086

10781087
return out;

0 commit comments

Comments
 (0)