已合并
docs(sanitizer): Document phase, sync and mutex double-lock detections #7243
docs(sanitizer): Document phase, sync and mutex double-lock detections #7243
已合并
zhengyaoff12创建于 2 天前
zhengyaoff12成员
2 天前

docs(sanitizer): Document phase, sync and mutex double-lock detections

The sanitizer guide predates the unit_flag phase (AccPhase/STPhase) and
sync (sync_src/sync_dst) pairing detections and the mutex double-lock
detection. Update the guide so the detection list, usage constraints and
examples match the current behavior.

Changes:

  • Add PHASE_MISMATCH / PHASE_DEADLOCK with three worked phase examples (mixed sync, dangling Final write, wrong K-chain head)
  • Add SYNC_UNPAIRED_SRC / SYNC_UNPAIRED_DST / SYNC_EVENT_REUSE with worked sync examples
  • Add MUTEX_DOUBLE_LOCK to the mutex pairing section
  • Update the report description: per-launch binary report file sanitizer_report.<launch_id>.bin and the launch-tagged kernel header line
  • Document that sync pairing is checked per core and cross-core pairs are not supported yet
likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 zhengyaoff12 的贡献)
Zzhengyaoff12成员
2 天前 创建了 pull request,commit efbb96b7
atomgit-bot
atomgit-bot
2 天前 评论:

变更摘要

本 PR 更新中文调试文档 docs/zh/guide/programming_guide/pro/debug/sanitizer.md,使 sanitizer 检测项清单、使用约束与示例和当前实现保持一致:检测范围从原来的 GM/tile 越界、重叠与 mutex 配对,扩展到相位(AccPhase/STPhase)使用错误与 sync_src/sync_dst 配对错误,并补充了 MUTEX_DOUBLE_LOCK、按次启动(launch)的报告文件命名以及日志缓冲预算环境变量。

主要改动

  • 检测类型清单扩展: 在检测类型表格中新增 PHASE_MISMATCH、PHASE_DEADLOCK、SYNC_UNPAIRED_SRC/SYNC_UNPAIRED_DST、SYNC_EVENT_REUSE,并把 MUTEX_DOUBLE_LOCK 并入 mutex 行,说明各类别的判别条件与 ERROR 级别。
  • 报告文件与标签行调整: 报告说明改为每次启动生成原始记录文件 sanitizer_report.<launch_id>.bin,kernel 标签行增加 launch 标识(如 launch 9b3f1c2e),并同步更新文档内所有示例输出片段。
  • 新增日志缓冲预算配置: 使用约束中补充可用环境变量 PYPTO_SANITIZER_LOG_BUDGET_MB 将默认约 1GB 的 GM 日志缓冲调整为指定 MiB。
  • 新增约束:sync 仅在单核内配对: 明确 sync_src 与 sync_dst 的配对检查在单个执行核(region)内进行,跨核配对暂不支持、两侧会被各自报告为漏配对;SIMT 线程块内不检测的范围补充了相位与 sync。
  • 新增相位与 sync 示例章节: 新增 MUTEX_DOUBLE_LOCK 重复加锁小节,以及相位(混用同步、Final 写悬挂、K 链首块误用 matmul_acc)和 sync(漏写 sync_dst、event 未消费即复用)示例,给出配对键四要素(region、set_pipe、wait_pipe、event_id)的字段解读与结论。
likedislike
不准确?
atomgit-bot
atomgit-bot
2 天前 评论:

代码审查

✅ 未发现问题

likedislike
不准确?
CANN-robotCANN-robot成员
2 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
2 天前 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.


PR Approval Progress

✅ Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
docs ✅ lyz0328, gaoxiang618 (2/2) ✅ lyz0328 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

zhengyaoff12, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
此处折叠了61条消息 查看更多
CANN-robotCANN-robot成员
1 天前 添加了label:ci-pipeline-passed
gaoxiang618成员
1 天前 评论:

/approve
/lgtm

likedislike
CANN-robot
CANN-robot成员
1 天前 评论:

The following users do not have permission to comment /lgtm or /approve on any module in this PR:
/approve: gaoxiang618

likedislike
CANN-robotCANN-robot成员
1 天前 添加了label:lgtm
CANN-robotCANN-robot成员
1 天前 合入了pull request