jax.pallas.tpu.matmul_acc_lhs#
- jax.pallas.tpu.matmul_acc_lhs(acc, lhs, load_staged_rhs=None)[source]#
Performs a matrix multiplication in a specific MXU.
If load_staged_rhs is not None, the previously pushed RHS will be loaded from the given staging register _before_ the matrix multiplication begins. The results of the multiplication are accumulated into the specified accumulator slice.
The MXU index is deduced from the provided accumulator.
- Parameters:
acc (Ref) – The accumulator slice used for results.
lhs (jax.Array) – The left-hand side operand. Must be M x 256. For M divisible by the number of sublanes multiplied by datatype packing.
load_staged_rhs (int | None) – The staging register to load the RHS from. If None, the RHS is not loaded from staging and the matmul will reuse the existing one.
- Return type:
None