Pull Request已成功合入, 合并人@CANN-robot
(感谢 zhengyaoff12 的贡献)变更摘要
本 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)的字段解读与结论。


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
/approveor/lgtm- Commenting
/approveimplies 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. 👍


/approve
/lgtm


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


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: