Closed
[Documentation|文档反馈]:SIMT 下 01_assert 与 09_log 两个样例的中英文 README 中与真实输出有差异 #1669
ruoshuisixueAdd on  Sep 15Closed at  Sep 16
ruoshuisixueCollaborators
Sep 15 Create

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

Describe the current behavior / 问题描述 (Mandatory / 必填)

examples/03_simt_api/01_utilities 下 01_assert 与 09_log 两个样例的中英文 README 中,“运行结果”章节展示的输出与样例实际运行输出不一致,具体有三处:

  1. 01_assert(README.md / README_en.md):断言失败信息中的源码行号写为 assert.asc:32,但 assert.asc 中 assert(in_shape < 1) 实际位于第 31 行。文档行号来自旧版源码,源码改动后文档未同步。
  2. 09_log(README.md / README_en.md):Ascend Error 报错位置写为 log.asc:88,[ASSERT] 断言位置写为 log.asc:47;当前 log.asc 中 kernel launch 语句位于第 86 行,assert(total_length < 100 && ...) 位于第 44 行。
  3. 09_log(中英文 README):ACL 底层错误码文案写为 EZ9999: Inner Error!,实际运行输出为 EZ9999: Internal error!(新版 CANN 运行时修改了该错误码的展示文案)。

用户按 README 输出中的行号去定位断言失败位置时会找错行,造成排查困扰。

Environment / 环境信息 (Mandatory / 必填)

  • CANN 版本:9.2

Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)

  1. 准备 ascend950pr_9599 环境并安装 CANN 9.2.0-beta.1
  2. 进入样例目录分别构建并运行两个样例:
    cd examples/03_simt_api/01_utilities/01_assert
    mkdir -p build && cd build
    cmake .. -DASCEND_CANN_PACKAGE_PATH=<CANN安装路径>
    make
    ./demo # 按 README 中“编译运行”章节执行

cd ../../09_log
mkdir -p build && cd build
cmake .. -DASCEND_CANN_PACKAGE_PATH=<CANN安装路径>
make
./demo
3. 对比程序实际输出与 README“运行结果”章节:

  • 01_assert:实际输出 [ASSERT] xxx/assert.asc:31: ...,README 写 :32
  • 09_log:实际输出 Ascend Error: ... log.asc:86 code=507035 EZ9999: Internal error! 及 [ASSERT] ... log.asc:44: ...,README 写 :88、:47、Inner Error!

Describe the expected behavior / 预期结果 (Mandatory / 必填)

README“运行结果”章节展示的输出应与样例在当前源码、当前 CANN 版本下的实际运行输出完全一致,即:

  • 01_assert:[ASSERT] xxx/assert.asc:31: void simt_assert(float *, uint32_t): Assertion 'in_shape < 1' failed.
  • 09_log:Ascend Error: ... log.asc:86 code=507035 EZ9999: Internal error!、[ASSERT] ... log.asc:44: void add_custom(float *, float *, float *, uint64_t): Assertion 'total_length < 100 && "Total length exceeds expected limit!"' failed.

样例文档中的行号应随源码变更同步维护,避免用户按文档定位到错误的代码行。

01_assert 实际运行输出(节选):
[SIMT] trap check start 1!
[SIMT] trap check start 2!
[SIMT] trap check start 3!
[SIMT] trap check start 3!
[ASSERT] xxx/assert.asc:31: void simt_assert(float *, uint32_t): Assertion in_shape < 1' failed. [ASSERT] xxx/assert.asc:31: void simt_assert(float *, uint32_t): Assertion in_shape < 1' failed.

09_log 实际运行输出(节选):
[INFO] Input shape: 12288
[INFO] Launching kernel with assert(total_length < 100)...
Ascend Error: /09_log/log.asc:86 code=507035 EZ9999: Internal error!
...
rtDeviceSynchronize execution failed, reason=vector core exception
...
[ASSERT] /09_log/log.asc:44: void add_custom(float *, float *, float *, uint64_t): Assertion `total_length < 100 && "Total length exceeds expected limit!"' failed.
[INFO] Execution completed. Check for error messages above.

Special notes for this issue/备注 (Optional / 选填)

likedislike
RruoshuisixueCollaborators
Sep 15 Added label: bug-report
RruoshuisixueCollaborators
Sep 15 Change title to "[Bug-Report|缺陷反馈]:SIMT examples/03_simt_api/01_utilities 下 01_assert 与 09_log 两个样例的中英文 README 中", originally titled "[Bug-Report|缺陷反馈]: ".
ruoshuisixueCollaborators
Sep 15 Comments:

文档描述和真实输出有差异,修复中

likedislike
RruoshuisixueCollaborators
Sep 15 Change title to "[Bug-Report|缺陷反馈]:SIMT 下 01_assert 与 09_log 两个样例的中英文 README 中与真实输出有差异", originally titled "[Bug-Report|缺陷反馈]:SIMT examples/03_simt_api/01_utilities 下 01_assert 与 09_log 两个样例的中英文 README 中".
RruoshuisixueCollaborators
Sep 15 Associated pull request
ruoshuisixueCollaborators
Sep 16 Comments:

已合入

likedislike
RruoshuisixueCollaborators
Sep 16 changed custom state from 待办的 to 已完成
RruoshuisixueCollaborators
Sep 16 Close issue
CANN-robotCANN-robotCollaborators
Sep 16 Added label: resolved
Lliuliu876Collaborators
Sep 21 changed custom category from 缺陷 to 文档
Lliuliu876Collaborators
Sep 21 Change title to "[Documentation|文档反馈]:SIMT 下 01_assert 与 09_log 两个样例的中英文 README 中与真实输出有差异", originally titled "[Bug-Report|缺陷反馈]:SIMT 下 01_assert 与 09_log 两个样例的中英文 README 中与真实输出有差异".