Pull Request已成功合入, 合并人@CANN-robot
(感谢 liuliu876 的贡献)变更摘要
本 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未变,启动配置与原行为一致。


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


/approve
/lgtm


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


描述
关联的Issue
测试
文档更新
类型标签