matmul#
- class braintrace.matmul(x, weight, bias=None)[source]#
ETP-aware matrix multiplication.
Computes \(y = x \mathbin{@} w \; (+ b)\).
Auto-dispatches to
etp_mm_p(batched) oretp_mv_p(unbatched) based onx.ndim.- Parameters:
x – Input array, shape
(..., in_features)or(in_features,).weight – Weight matrix, shape
(in_features, out_features).bias – Optional bias vector, shape
(out_features,).
- Returns:
Output array.