ops: act_mul's relu, relu(x)^2 over one tensor

act_mul's `act` takes "relu": with one tensor in both operands it is relu(x)^2, Nemotron-H's
ungated expert activation and its vision projector's. libref, libavx and libr4d.
This commit is contained in:
keptn42 committed 2026-11-04 22:08:53 +01:00
1 parent 63416510a0
commit 2420b2b383
10 files changed
+42 -21

No files matched your search

+3 -3
View File
@@ -3185,9 +3185,9 @@ static const RadOpSchema kSchemas[] = {
"op, not gelu, because gated feed-forwards are trained with the tanh form and the "
"unary gelu is the exact erf one."),
SCHEMA("act_mul", pActMul, oBinary,
"y = act(a) * b, the activation (silu, gelu, gelu_tanh, sigmoid or quick_gelu) rounded "
"to y's dtype before "
"the product: silu_mul with its two halves in two operands."),
"y = act(a) * b, the activation (silu, gelu, gelu_tanh, sigmoid, quick_gelu or relu) "
"rounded to y's dtype before the product: silu_mul with its two halves in two "
"operands."),
SCHEMA("seg_mean", pSegMean, oSegMean,
"Row s of y is the mean of x's rows [cu_seqlens[s], cu_seqlens[s+1]), summed in f64 "
"and rounded once; an empty segment is zeros."),