matmul_leakyrelu算子修改数据规模后出现精度错误
收藏回复举报
matmul_leakyrelu算子修改数据规模后出现精度错误
t('forum.solved') 已解决
发表于2026-02-04 10:13:27
0 查看

我在仅修改了cv融合的matmul_leakyrelu官方源码的数据规模后,出现了结果与标杆不一致的情况,复现步骤如下:
1. 下载源码https://gitee.com/ascend/samples/tree/master/operator/ascendc/0_introduction/13_matmulleakyrelu_kernellaunch/MatmulLeakyReluInvocation

2. 修改matmul_leakyrelu_custom_tiling.cpp的数据规模设置:

cke_3858.png   

​3. 修改main.cpp的数据规模设置:

cke_6566.png

4. 修改scripts/gen_data.py的数据规模设置:
cke_11502.png

5. 执行bash run.sh -r npu -v Ascend910B3,发现结果与标杆不一致

cke_20119.png

完整代码已附在附件中

我要发帖子