---
title: "ClikaRT::ops::bmm"
sidebar_label: "bmm"
description: "Batched matrix multiply of two rank-3 tensors, with an optional fused bias and activation epilogue. a [B, M, K] x b [B, K, N] -> [B, M, N], one independent matmul per batch index."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--function">function</span>

## bmm() {#bmm}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`bmm`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `input`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `other`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`OptionalTensor`](../../index.md#OptionalTensor) `bias` `=` `{}`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;`std::optional<`[`Activation`](./index.md#Activation)`>` `activation` `=` `std::nullopt`<br />
)

</div>

Batched matrix multiply of two rank-3 tensors, with an optional fused bias and activation epilogue.

`a [B, M, K] x b [B, K, N] -> [B, M, N]`, one independent matmul per batch index.

**Parameters**

- `input`: left operand `[B, M, K]`.
- `other`: right operand `[B, K, N]`.
- `bias`: optional additive bias, broadcastable to the output.
- `activation`: optional fused epilogue; absent = none.

**Returns:** `[B, M, N]`.

**Throws**

- `ClikaRT::Error`: (`INVALID_ARGUMENT`) when the operands are not rank-3 or the batch/inner dims disagree.

<div class="api-declared">

Declared in `ClikaRT/compute/ops.h`, line 2868

</div>
