ascendc 版本的算子性能远远落后 tbe版本的算子性能差?
收藏回复举报
ascendc 版本的算子性能远远落后 tbe版本的算子性能差?
t('forum.solved') 已解决
发表于2025-01-14 18:55:30
0 查看

* 参考  https://www.hiascend.com/document/detail/zh/Atlas200IDKA2DeveloperKit/23.0.RC2/Appendices/ttmutat/atctool_000036.html 中描述的单算子配置文件,完成了 ascendc 版本bmm算子bmm_v3.json 和 tbe 版本bmm算子bmm_v2.json 的配置(详见附件),获得om模型图 

    ascendc 算子BatchMatMulV3: atc --singleop=./bmm_v3.json --output=./out/ --soc_version=Ascend310P3 --op_debug_level=1 --dump_mode=1

    tbe 算子BatchMatMulV2:           atc --singleop=./bmm_v2.json --output=./out/ --soc_version=Ascend310P3 --op_debug_level=1 --dump_mode=1

* 然后使用 python data_gen_batchmatmulv2_opt.py 生成om模型图的输入测试数据,即shape [30,32,128] * [128, 128]

* 在进行上板实测性能,即连续执行10,去掉首次预热求剩余9次的算子执行时间的平均值,发现他们的算子运行时间差距非常的显著,不知道这是否合理?

tbe :msprof --application="./a.out ./BatchMatMulV2_bias.om 10" --output=./tik_out 平均6.23 us

ascendc :msprof --application="./a.out ./BatchMatMulV3_bias.om 10" --output=./ascend_out, 平均151.11 us

我要发帖子