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

+2 -1
View File
@@ -1023,7 +1023,8 @@ static const RadOpSchema kSchemas[] = {
{ "mul_weight", ARR(pMulWeight), ARR(oMulWeight),
"y = x * w, `w` a weight of one element or one row, broadcast; f32 product rounded once." },
{ "act_mul", ARR(pActMul), ARR(oBinary),
"y = act(a) * b, act silu / gelu / gelu_tanh, the activation rounded to y's dtype first." },
"y = act(a) * b, act silu / gelu / gelu_tanh / sigmoid / quick_gelu / relu, the activation "
"rounded to y's dtype first." },
{ "seg_mean_bf16_sum", ARR(pSegMean), ARR(oSegMean),
"BF16 masked mean: f32 segment sum rounded to BF16 before division, then BF16 output." },
{ "seg_mean", ARR(pSegMean), ARR(oSegMean),