ClikaRT::ops::matmul
function
matmul()
Tensor matmul(
Tensor a,
Tensor b,
OptionalTensor bias = {},
std::optional<Activation> activation = std::nullopt,
bool transpose_a = false,
bool transpose_b = false,
double situ_beta = 0.0,
double situ_linear_beta = 0.0
)
a @ b (+ bias) with an optional fused activation epilogue. A gated activation (SwiGlu/GeGlu/ReGlu/Situ) takes the product as a concatenated [*, 2d] gate‖up projection and emits [*, d] in one pass. situ_beta/situ_linear_beta are Activation::Situ's two soft-cap scalars (β and lβ in β·tanh(gate/β)·sigmoid(gate) · lβ·tanh(up/lβ)); pass the model's own config values. Situ requires BOTH > 0, and either scalar with any other activation rejects (it would otherwise be silently ignored). The transform computes at fp32 end-to-end with one demote at the store for f16/bf16 outputs.
Declared in ClikaRT/compute/ops.h, line 2743