For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).
Mojo function
batch_matmul_shape
def batch_matmul_shape[rank: Int, a_type: DType, b_type: DType](a: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=a.static_spec], b: ManagedTensorSlice[IOSpec[_, _].Input, static_spec=b.static_spec]) -> IndexList[rank]
Computes the output shape for the mo.batch_matmul graph op.
Parameters:
- βrank (
Int): Tensor rank of the batched matmul operands and output. - βa_type (
DType): Element type of theainput tensor. - βb_type (
DType): Element type of thebinput tensor.
Args:
- βa (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=a.static_spec]): Left-hand batched input tensor. - βb (
ManagedTensorSlice[IOSpec[_, _].Input, static_spec=b.static_spec]): Right-hand batched input tensor.
Returns:
IndexList[rank]: The output shape of the batched matmul.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!