已合并
feat: Add batch_norm_reduce API documentation and enhance unit tests. #5251
fgd_dragon创建于 6月24日
feat: Add batch_norm_reduce API documentation and enhance unit tests. #5251
已合并
Pull Request已成功合入, 合并人@ascend-robot
(感谢 fgd_dragon 的贡献)6月24日 创建了 pull request,commit 70f2db1b
ascend-robot
6月24日 评论:
6月24日 评论:
6月24日 添加了label:ascend-cla/yes
ascend-robot
6月24日 评论:
6月24日 评论:
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 |
|---|---|---|
| docs | ✅ htchu, molly123321, liangsongwei (3/2) | ✅ liangsongwei, htchu (2/1) |
| repo-Ascend/op-plugin | ✅ liangsongwei, htchu (2/2) | ✅ liangsongwei, htchu (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
wang-ziqi-code, thanks for your pull request. All authors of the commits have signed the CLA. 👍


6月24日 添加了label:needs-issue
此处折叠了208条消息 查看更多
7月2日 添加了label:lgtm
7月2日 关闭了关联的issue
7月2日 合入了pull request
ascend-robot
7月2日 评论:
7月2日 评论:
Pull Request 已合并或已关闭。
If you want to solve this problem, you can click here to do it in the FAQs.


【合入来源】
【修改方案】
torch_npu.batch_norm_reduce自定义接口文档,补充产品支持、功能说明、函数原型、参数说明、返回值说明、约束说明和调用示例。torch_npu自定义接口索引与 PyTorch API 菜单入口。_op_plugin_docs.py中补充torch_npu.batch_norm_reduce运行时 docstring,使help(torch_npu.batch_norm_reduce)可展示接口说明。batch_norm_reduceUT:float32、float16正常路径。bfloat16用例,并使用设备约束。eps不影响输出结果的测试。batch_norm_reduce_meta输出 dtype 为float32,并同步修正 FakeTensor 测试断言。原因是 C++ 实现中sum和square_sum均通过self.options().dtype(at::kFloat)创建,真实执行输出 dtype 固定为float32;原 meta 实现使用self.dtype构造输出,在float16/bfloat16输入场景下会与真实接口行为不一致。【资料变更】
涉及资料变更。
新增
torch_npu.batch_norm_reduce接口文档,并同步更新自定义接口列表、菜单入口和运行时 docstring。【接口变更】
不涉及新增或修改已有接口签名。
本次补充的是已存在接口
torch_npu.batch_norm_reduce(input, eps) -> (Tensor, Tensor)的文档、运行时说明和 UT 看护;未修改接口参数、返回值数量或调用方式。【功能验证】
python test/test_base_ops/test_batch_norm_reduce.pypython test/core_tests/test_fake_tensor.py -k batch_norm_reduce新增/变更内容已补充 UT 看护,覆盖基础数值语义、shape、dtype、
eps行为、非法维度和 FakeTensor meta 行为。【CheckList】