General dot product of two arrays, supporting contraction over arbitrary axes and batching.
Arguments
- lhs, rhs
(
arrayish)
Left and right operand. Operands are promoted to a common data type. Scalars are broadcast to the shape of the other operand.- contracting_axes
(
list(integer(), integer()))
A list of two integer vectors specifying which axes oflhsandrhsto contract over. The contracted axes must have matching sizes.- batching_axes
(
list(integer(), integer()))
A list of two integer vectors specifying which axes oflhsandrhsare batch axes. These must have matching sizes.- precision
(
character(1))
Controls the trade-off between speed and numerical accuracy of the operation. One of"highest"(default),"high"or"default". Only the StableHLO backend honors this; it is ignored by the quickr backend.
Value
arrayish
The output shape is the batch axes followed by the remaining
(non-contracted, non-batched) axes of lhs, then rhs.
StableHLO
Lowers to hlo_dot_general().
See also
nv_matmul(), %*%