已合并
fix issues 263 281 369 #550
fix issues 263 281 369 #550
已合并
Chen Ning创建于 14 天前
Chen Ning
Chen Ning
14 天前
## 描述 解决多个issues ## 关联的Issue issue [#263](https://gitcode.com/cann/cann-learning-hub/issues/263) issue [#281](https://gitcode.com/cann/cann-learning-hub/issues/281) issue [#369](https://gitcode.com/cann/cann-learning-hub/issues/369) ## 测试 ## 文档更新 ## 类型标签 - [x] Bug修复 - [ ] 新特性 - [ ] 内容优化 - [ ] 其他,请描述: ## 其他信息
likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 Chen Ning 的贡献)
Chen NingChen Ning
14 天前 创建了 pull request,commit eada7fd5
Chen NingChen Ning
14 天前 关联了issue:[Course-Feedback|课程反馈]: 01.04 课后练习开头描述错误(复制粘贴错误)
atomgit-bot
atomgit-bot
14 天前 评论:

变更摘要

此 PR 主要修复了 Ascend C 算子开发教程中的三处问题(对应 issue #263、#281、#369):在 sigmoid_custom.asc 示例代码中补充了缺失的 aclrtFreeHost(xHost) 调用以修复资源泄漏,并修正了两份 Jupyter Notebook 教程中不准确或不恰当的文本描述。

主要改动

  • 修复 sigmoid_custom.asc 中 xHost 内存泄漏:在 RunCase 函数的资源清理段中,于 aclrtFreeHost(yHost) 之前补充了 aclrtFreeHost(xHost) 调用,确保通过 aclrtMallocHost 分配的 xHost 内存被正确释放。该修复同时应用于 answer/02.08/src/02.08/ 两个目录下的同名文件。
  • 删除 01.02_ai_and_operator_basics.ipynb 中关于 torch.TensorSpec 的冗余表述:移除了 "PyTorch 2.0 及以上版本也提供了 torch.TensorSpec 接口..." 一整段描述,使 TensorDesc 相关介绍的收尾更加简洁。
  • 修正 01.04_ascend_c_op_dev_basic_concepts.ipynb 课后练习导语:将原描述 "本节总体介绍了CANN异构计算架构与昇腾NPU的硬件细节" 更正为 "本节总体介绍了Ascend C的基本概念、开发场景以及AI Core的抽象硬件架构",使其与该节实际内容匹配。
likedislike
atomgit-bot
atomgit-bot
14 天前 评论:

代码审查

✅ 未发现问题

likedislike
CANN-robotCANN-robot成员
14 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
14 天前 评论:

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


PR Approval Progress

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

Module Approval Details

module lgtm status approve status
repo-cann/cann-learning-hub waimaidaole, YANXI_ZHAO (2/2) YANXI_ZHAO (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)
likedislike
CANN-robot
CANN-robot成员
14 天前 评论:

CLA Signature Pass

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

likedislike
Chen NingChen Ning
14 天前 删除了关联的issue:[Course-Feedback|课程反馈]: 01.04 课后练习开头描述错误(复制粘贴错误)
Chen NingChen Ning
14 天前 关联了issue:[Course-Feedback|课程反馈]: 01.02错误引用不存在的torch.TensorSpec接口
Chen NingChen Ning
14 天前 修改了pull request 的描述
Chen NingChen Ning
14 天前 修改了pull request 的描述
Chen Ning
Chen Ning
14 天前 评论:

compile

likedislike
Chen Ning
Chen Ning
14 天前 评论:

compile

likedislike
CANN-robotCANN-robot成员
14 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
14 天前 评论:

流水线任务触发成功
任务链接 [179aca6d72924e46a796f7356a746c92][流水线指导]

任务名称状态日志下载链接

[2026-08-05 16:40:03]    CI执行结束

likedislike
CANN-robotCANN-robot成员
14 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
14 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
14 天前 评论:

流水线任务触发成功
任务链接 [e58e68b4d20341388108982b7bfc3e2a][流水线指导]

任务名称状态日志下载链接
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
Check_Pr ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
codecheck_style ✅ SUCCESS >>>>>
pre-commit ✅ SUCCESS

[2026-08-05 16:43:33]    CI执行结束

likedislike
YANXI_ZHAO成员
14 天前 评论:

/approve

likedislike
YANXI_ZHAO成员
14 天前 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
14 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
14 天前 添加了label:ci-pipeline-passed
YANXI_ZHAO成员
14 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
14 天前 添加了label:approved
meme成员
14 天前 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
14 天前 添加了label:lgtm
CANN-robotCANN-robot成员
14 天前 关闭了关联的issue
CANN-robotCANN-robot成员
14 天前 合入了pull request