须知:该接口后续版本会废弃,请使用最新aclnnQuantMatmulV5接口。
每个算子分为,必须先调用 aclnnQuantMatmulGetWorkspaceSize 接口获取计算所需workspace大小以及包含了算子计算流程的执行器,再调用 aclnnQuantMatmul 接口执行计算。
[object Object]
[object Object]
- 确定性说明:
- [object Object]Atlas A3 训练系列产品/Atlas A3 推理系列产品[object Object]、[object Object]Atlas A2 训练系列产品/Atlas A2 推理系列产品[object Object]:aclnnQuantMatmul默认确定性实现。
该接口迁移到aclnnQuantMatmulV4接口的方法:
- 输入x1,x2,bias可以直接转为aclnnQuantMatmulV4接口中的x1,x2,bias。
- 输入deqScale为FLOAT型,将这个FLOAT数构造成shape为(1,)的FLOAT型aclTensor(参考中的CreateAclTensor), 再利用aclnnTransQuantParamV2转为shape为(1,)的uint64_t的aclTensor(参考),记为scale,对标aclnnQuantMatmulV4接口中的scale。
- aclnnQuantMatmulV4接口中的可选输入offset/pertokenScaleOptional设置为nullptr,transposeX1和transposeX2均设置为false。
- 接口参数设置为
[object Object]。
[object Object]