已合并
docs: add full HelloWorld sample code and build/run steps #6487
docs: add full HelloWorld sample code and build/run steps #6487
已合并
liuliu876创建于 21 天前
liuliu876成员
21 天前

描述

关联的Issue

测试

文档更新

类型标签

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

变更摘要

本 PR 以文档/示例完善为目标,对 examples/01_simd_cpp_api/00_introduction/00_quickstart/hello_world/hello_world.asc 示例的核函数调用写法做了小幅度调整:将原本硬编码的块数 8 提取为 constexpr uint32_t numBlocks 常量,并在启动 hello_world 核函数时使用该常量。其余运行管理与资源申请流程(如 aclrtSetDevice、aclrtCreateStream、aclrtSynchronizeStream、aclrtDestroyStream、aclrtResetDevice)保持不变。

主要改动

  • 核函数启动块数常量提取: 在 hello_world.asc 中新增 constexpr uint32_t numBlocks = 8;,把原先直接写在调用表达式里的块数提取为具名常量。
  • 启动参数改用常量: 核函数调用由 hello_world<<<8, 0, stream>>>() 改为 hello_world<<<numBlocks, 0, stream>>>(),其余参数 0 与 stream 未变,启动配置与原行为一致。
likedislike
不准确?
atomgit-bot
atomgit-bot
21 天前 评论:

代码审查

✅ 未发现问题

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

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 ✅ munanhw, hujiawen_kaven (2/2) ✅ munanhw (1/1)
examples ✅ munanhw, hujiawen_kaven (2/2) ✅ munanhw (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
此处折叠了48条消息 查看更多
CANN-robotCANN-robot成员
20 天前 添加了label:approved
hujiawen_kaven成员
20 天前 评论:

/approve
/lgtm

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

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

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