已合并
[fix]add empty_with_swapped_memory ut #30887
梁松伟创建于 2月13日
[fix]add empty_with_swapped_memory ut #30887
已合并
梁松伟创建于 2月13日
梁松伟
梁松伟成员
2月13日

【合入来源】

https://gitcode.com/Ascend/pytorch/issues/1406

【修改方案】

补充empty_with_swapped_memory接口预期计算值比对

【资料变更】

不涉及

【接口变更】

不涉及

【功能验证】

【CheckList】

PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x]

likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 梁松伟 的贡献)
梁松伟梁松伟成员
2月13日 创建了 pull request,commit 4d89327e
ascend-robot
ascend-robot成员
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 /approve or /lgtm
  • Commenting /approve implies 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. 👍

likedislike
ascend-robotascend-robot成员
2月13日 添加了label:ascend-cla/yes
AtlasAccount
AtlasAccount成员2月13日进行代码检视2
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 
AtlasAccount
AtlasAccount2月13日评论:

代码逻辑和结构: 函数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

此评论由代码审查工具自动生成

likedislike
System
系统消息系统
2月13日 评论:

changed this line on 53749661 view diff detail

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

/lgtm

likedislike
renyujin成员
3月21日 评论:

/lgtm
/approve

likedislike
ascend-robotascend-robot成员
3月21日 添加了label:approvedlgtm
ascend-robot
ascend-robot成员
3月21日 评论:

Review Guide

This pull-request passes review.
Committers who wrote a comment of /approve are: renyujin.
Reviewers who wrote a comment of /lgtm are: renyujin, ffmh.

likedislike
ascend-robotascend-robot成员
3月21日 合入了pull request