已合并
[fix]add empty_with_swapped_memory ut #30887
梁松伟创建于 2月13日
[fix]add empty_with_swapped_memory ut #30887
已合并
Pull Request已成功合入, 合并人@ascend-robot
(感谢 梁松伟 的贡献)AtlasAccount
2月13日 评论:
2月13日 评论:
ascend-robot
2月13日 评论:
2月13日 评论:
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 |
|---|---|---|
| test | ✅ ffmh, renyujin (2/2) | ✅ renyujin (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
liangsongwei, thanks for your pull request. All authors of the commits have signed the CLA. 👍


2月13日 添加了label:ascend-cla/yes
torchnpugen/utils.py
已过期
@@ -640,4 +681,4 @@
640681 new_path = os.path.join(os.path.dirname(original_path), codegen_yaml_filename)
641682 return new_path
642683
643684
代码逻辑和结构: 函数process_template_files()缺少re模块的导入。虽然代码片段中第21行导入了itertools,但第640行和第657行使用了re.sub()函数,而re模块并未在文件头部导入。这会导致运行时NameError: name 're' is not defined。
问题类型: 代码逻辑和结构
文件路径: torchnpugen/utils.py
行号: 640
问题代码:
# Replace "torch_npu/" with empty string in include statements
template_content = re.sub(r'#include "torch_npu/', '#include "', template_content)
修改建议:
在文件头部的import部分添加re模块的导入。建议在第21行附近添加:import re
此评论由代码审查工具自动生成


此处折叠了98条消息 查看更多
ffmh
3月21日 评论:
3月21日 评论:
/lgtm


3月21日 添加了label:approvedlgtm
ascend-robot
3月21日 评论:
3月21日 评论:
3月21日 合入了pull request
【合入来源】
https://gitcode.com/Ascend/pytorch/issues/1406
【修改方案】
补充empty_with_swapped_memory接口预期计算值比对
【资料变更】
不涉及
【接口变更】
不涉及
【功能验证】
【CheckList】