已关闭
[Bug-Report|缺陷反馈]: quant_matmul_mxfp4 与 matmul_tutorials 样例存在计时、校验、文档和依赖声明问题 #70
ddssz创建于  3月31日关闭于  3月31日
ddssz
ddssz成员
3月31日 创建

Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.

一、问题描述 (必填)

Samples/2_Performance/matmul_story 下部分 MXFP4 样例存在以下问题:

  1. matmul_recipes/examples/quant_matmul_mxfp4 中的算法推荐脚本原先依赖样例程序输出的 aclrtEvent 计时作为排序依据,但 event 计时容易受到共享 NPU 场景影响,不适合作为推荐依据。
  2. quant_matmul_mxfp4_a_full_load.cppquant_matmul_mxfp4_swat.cpp 中保留了基于 event 的计时代码。
  3. matmul_tutorials 目录下所有 tutorial .cpp 都包含基于 event 的计时代码。
  4. matmul_tutorials 下部分 tutorial 样例执行结束后没有自动调用 verify_result.py 做结果校验。
  5. quant_matmul_mxfp4/README.md 中缺少当前样例的使用约束说明,例如当前 case 仅支持 A 不转置、B 转置,即 A 为 [M, K]、B 为 [N, K],两侧 K 轴位于内轴。
  6. requirements.txt 中缺少样例脚本实际使用到的 Python 依赖声明及版本信息。

受影响文件包括但不限于:

  • Samples/2_Performance/matmul_story/matmul_recipes/examples/quant_matmul_mxfp4/quant_matmul_mxfp4_algorithm_recommend.py
  • Samples/2_Performance/matmul_story/matmul_recipes/examples/quant_matmul_mxfp4/quant_matmul_mxfp4_a_full_load.cpp
  • Samples/2_Performance/matmul_story/matmul_recipes/examples/quant_matmul_mxfp4/quant_matmul_mxfp4_swat.cpp
  • Samples/2_Performance/matmul_story/matmul_recipes/examples/quant_matmul_mxfp4/README.md
  • Samples/2_Performance/matmul_story/matmul_tutorials/*/*.cpp
  • requirements.txt

二、环境信息 (可选)

  • 昇腾硬件型号:Ascend950
  • CANN版本:9.0.0
  • 操作系统:Linux ubuntu 20.04
  • Python版本:>= 3.9

三、重现步骤 (可选)

可以按以下方式观察问题:

cmake -S . -B build
cmake --build build --parallel
cmake --install build --prefix ./build_out
cd build_out/2_Performance/matmul_story/matmul_recipes/examples/quant_matmul_mxfp4
python3 quant_matmul_mxfp4_algorithm_recommend.py 256 256 256

likedislike
ddssz
ddssz成员
3月31日 评论:

/assign

likedislike
CANN-robotCANN-robot成员
3月31日 将 smdbha 设为负责人
ddsszddssz成员
3月31日 修改了issue 的描述
CANN-robotCANN-robot成员
3月31日 关闭了 issue
CANN-robotCANN-robot成员
3月31日 添加了label:resolved