已合并
【fix】add_models_patch #32864
Lu_G创建于 4月1日
【fix】add_models_patch #32864
已合并
Pull Request已成功合入, 合并人@ascend-robot
(感谢 Lu_G 的贡献)ascend-robot
4月1日 评论:
4月1日 评论:
ascend-robot
4月1日 评论:
4月1日 评论:
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-Ascend/pytorch | ✅ wangmin0104, 李晶 (2/2) | ✅ 李晶 (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
Lu_G, thanks for your pull request. All authors of the commits have signed the CLA. 👍


4月1日 添加了label:ascend-cla/yes
benchmarks/npu_support.py
已过期
@@ -588,0 +635,4 @@
635+ nn.init.normal_(self.w_ks.weight, mean=0, std=np.sqrt(2.0 / (d_model + d_k)))
636+ nn.init.normal_(self.w_vs.weight, mean=0, std=np.sqrt(2.0 / (d_model + d_v)))
637+
638+ # fix two different devices npu, cpu
注释与文档问题: 在_patch_model_20函数中,new_init方法里有一行注释:'# fix two different devices npu, cpu',但注释与代码的实际内容不符。代码是设置self.temperature = d_k ** 0.5,这与设备无关。这个注释可能是错误的或者放错了位置。正确的注释应该解释为什么需要重新实现__init__方法,或者说明与原始实现的差异。
问题类型: 注释与文档问题
文件路径:
benchmarks/npu_support.py行号: 638
问题代码:
# fix two different devices npu, cpu
self.temperature = d_k ** 0.5修改建议:
修正注释以准确描述代码意图。如果确实是为了修复设备问题,应该解释具体是什么问题以及如何修复。如果注释放错了位置,应该将其移到正确的位置或删除。
---
此评论由代码审查工具自动生成
此评论由代码审查工具自动生成


此处折叠了50条消息 查看更多
4月3日 添加了label:approved
wangmin0104
4月3日 评论:
4月3日 评论:
/lgtm


4月3日 添加了label:lgtm
ascend-robot
4月3日 评论:
4月3日 评论:
Review Guide
This pull-request passes review.
Committers who wrote a comment of /approve are: 李晶.
Reviewers who wrote a comment of /lgtm are: wangmin0104, 李晶.


4月3日 合入了pull request
【合入来源】
【修改方案】
【资料变更】
【接口变更】
【功能验证】
【CheckList】