已合并
修复simt样例中的asc_init不全等隐患问题 #7255
wulinyu创建于 19 天前
修复simt样例中的asc_init不全等隐患问题 #7255
已合并
wulinyu创建于 19 天前
wulinyu
wulinyu成员
19 天前

描述

修复simt 混合编程样例中的asc_init不全等隐患问题

确保样例使用asc_tools的npucheck扫描无问题

关联的Issue

测试

样例验证OK

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 wulinyu 的贡献)
wulinyuwulinyu成员
19 天前 创建了 pull request,commit 00f626cb
atomgit-bot
atomgit-bot
19 天前 评论:

变更摘要

本 PR 针对 examples/05_simd_simt_hybrid 下的 SIMD/SIMT 混合编程样例,补齐核函数入口缺失的 asc_init() 调用,并补全流水事件同步中的成对操作,使样例通过 asc_tools 的 npucheck 扫描。改动集中在 __global__ __vector__ 核函数的初始化约定与 MTE2/Vector 流水同步逻辑,属于样例正确性修复。

主要改动

  • 核函数入口统一补充 asc_init():gather_and_adds.asc、hash_table_mte_queue.asc、integer_div.asc、matrix_transpose.asc、lambda_operator_hybrid.asc 中的各个 __global__ __vector__ 核函数在函数体起始处新增 asc_init(),保证核函数执行前的初始化完整。
  • integer_div.asc 新增事件同步对:在 asc_copy_gm2ub_align 之前新增 asc_sync_notify(PIPE_V, PIPE_MTE2, EVENT_ID0) 与 asc_sync_wait(PIPE_V, PIPE_MTE2, EVENT_ID0),使 Vector 与 MTE2 搬运动作按事件顺序放行。
  • lambda_operator_hybrid.asc 补全缺失的同步等待:在已有的 asc_sync_notify(PIPE_V, PIPE_MTE2, EVENT_ID0) 之后补上对应的 asc_sync_wait(PIPE_V, PIPE_MTE2, EVENT_ID0),消除只通知不等待的隐患。
  • matrix_transpose.asc 多核函数覆盖:transpose_naive_kernel、transpose_ub_2tile_static_kernel、transpose_ub_2tile_loop_kernel、transpose_ub_pad_loop_kernel、transpose_ub_pad_db_kernel 均在入口新增 asc_init(),覆盖朴素、分块、Padding 与双缓冲各实现路径。
likedislike
不准确?
atomgit-bot
atomgit-bot
19 天前 评论:

代码审查

✅ 未发现问题

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

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
examples ✅ YANXI_ZHAO, louyuxuan, 诸葛洵 (3/2) ✅ YANXI_ZHAO (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
CANN-robotCANN-robot成员
19 天前 更新了PR
此处折叠了5条事件消息 查看更多
CANN-robotCANN-robot成员
19 天前 添加了label:cann-cla/yes
wulinyu
wulinyu成员
19 天前 评论:

/compile

likedislike
wulinyuwulinyu成员
19 天前 预合并成功(commit_id: eeea1793db6150ee3b91fda851251428f28f7211)
CANN-robot
CANN-robot成员
19 天前 评论:
🚀 CI 流水线已启动
📋 执行详情: 点击查看流水线
likedislike
CANN-robotCANN-robot成员
19 天前 添加了label:ci-pipeline-running
CANN-robotCANN-robot成员
19 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
19 天前 添加了label:ci-pipeline-passed
louyuxuan
louyuxuan成员
19 天前 评论:

/lgtm

likedislike
wangxiaozhi
wangxiaozhi成员
19 天前 评论:

/approve

likedislike
zhugexun_sjtu
zhugexun_sjtu成员
19 天前 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
19 天前 添加了label:lgtm
YANXI_ZHAO
YANXI_ZHAO成员
19 天前 评论:

/approve

likedislike
YANXI_ZHAOYANXI_ZHAO成员
19 天前 通过审查
CANN-robot
CANN-robot成员
19 天前 评论:

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

likedislike
YANXI_ZHAOYANXI_ZHAO成员
19 天前 通过了评审
CANN-robotCANN-robot成员
19 天前 添加了label:approved
CANN-robotCANN-robot成员
19 天前 合入了pull request