---
title: kutacc_af2_rigid_rot_matmul
description: "rigid_rot_matmul实现矩阵乘矩阵，输入为两个矩阵，输出为矩阵。"
url: https://www.hikunpeng.com/document/detail/zh/kunpenghpcs/hpckit/devg/KunpengHPCKit_developer_143.html
sourcePath: /source/zh/kunpenghpcs/hpckit/devg/KunpengHPCKit_developer_143.html
indexId: 202efcbfc7415c1f5b9119bf366b1c73608d36ff915c738b1ee3acfb1628ff8667
---
# kutacc_af2_rigid_rot_matmul

rigid_rot_matmul实现矩阵乘矩阵，输入为两个矩阵，输出为矩阵。

#### 接口定义

void kutacc_af2_rigid_rot_matmul(kutacc_tensor_h a, kutacc_tensor_h b, kutacc_tensor_h out);


#### 参数

| 参数名 | 类型 | 描述 | 输入/输出 | tensor shape |
| --- | --- | --- | --- | --- |
| a | kutacc\_tensor\_h | 第一个旋转矩阵 | 输入 | [..., 3, 3] |
| b | kutacc\_tensor\_h | 第二个旋转矩阵 | 输入 | [..., 3, 3] |
| out | kutacc\_tensor\_h | 输出数据 | 输出 | [..., 3, 3] |


kutacc_af2_rigid_rot_matmul参数的约束关系：dim = a.dim - 2; a.strides[dim] = 3; a.strides[dim +1] = 1; b.strides[dim] = 3; b.strides[dim + 1] = 1


#### 示例

rigid算子均用在invariant_point_attention算子内部，具体用例应参考8.1.2.2.2.1.1.9环节的invariant_point_attention算子的示例
