已合并
fix(pad_v2): golden bfloat16 分支 cv 转为 float 避免类型错误 #3625
yefeicoding创建于 6月29日
fix(pad_v2): golden bfloat16 分支 cv 转为 float 避免类型错误 #3625
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 yefeicoding 的贡献)6月29日 创建了 pull request,commit f620e52d
6月29日 添加了label:cann-cla/yes
CANN-robot
6月29日 评论:
6月29日 评论:
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 |
|---|---|---|
| conversion/transpose | ✅ 宋恺, zhanw_coding (2/2) | ✅ 宋恺, zhanw_coding (2/1) |
| repo-cann/ops-math | ✅ zhanw_coding, 宋恺 (2/2) | ✅ 宋恺, zhanw_coding (2/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
yefeicoding, thanks for your pull request. All authors of the commits have signed the CLA. 👍


atomgit-bot
6月29日 评论:
6月29日 评论:
变更摘要
此 PR 修复了 pad_v2_golden 函数在 bfloat16 分支中的类型错误:当输入数据类型为 bfloat16 时,constant_values_arr[0] 返回的是 numpy 标量,后续传给 PyTorch 的 pad 操作可能因类型不匹配导致错误。修改将其显式转换为 Python float,与 x 被转为 torch.float32 的行为保持一致。
主要改动
conversion/pad_v2/tests/assets/golden.py: 在pad_v2_golden函数的 bfloat16 分支中,将cv = constant_values_arr[0]改为cv = float(constant_values_arr[0]),确保cv为 Python 原生浮点数,避免后续 PyTorch 操作的类型错误。


atomgit-bot
6月29日 评论:
6月29日 评论:
6月30日 update merge request[project id: 7649531, iid: 3625, commit_id: 04c17fbfaf22ad63673555b97af1a6fa9a0ea8a8] virtual merging success
6月30日 update merge request[project id: 7649531, iid: 3625, commit_id: 04c17fbfaf22ad63673555b97af1a6fa9a0ea8a8] virtual merging success
此处折叠了23条事件消息 查看更多
6月30日 update merge request[project id: 7649531, iid: 3625, commit_id: 9f8ee9cde4e15cfc9710a8803407dcc07c0ba727] virtual merging success
6月30日 update merge request[project id: 7649531, iid: 3625, commit_id: 9f8ee9cde4e15cfc9710a8803407dcc07c0ba727] virtual merging success
yefeicoding
6月30日 评论:
6月30日 评论:
/compile


6月30日 update merge request[project id: 7649531, iid: 3625, commit_id: d29c4d8a55623fb11262dcbd1d8c565f0df4809d] virtual merging success
6月30日 update merge request[project id: 7649531, iid: 3625, commit_id: d29c4d8a55623fb11262dcbd1d8c565f0df4809d] virtual merging success
6月30日 添加了label:ci-pipeline-running
CANN-robot
6月30日 评论:
6月30日 评论:
流水线任务触发成功
任务链接 [b1a0651a5ec544cb960b091b7161dcd6][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| pre_comment | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_X86_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_mobile_station_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_X86_A5_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_harmony-infer | ✅ SUCCESS | >>>>> | |
| Compile_Ascend_ARM_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_experimental_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_single_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM_A5_ubuntu24 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910b | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_910c | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_X86_monitor_950 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_harmony-infer-chs-math | ✅ SUCCESS | >>>>> | |
| Compile_kirin-harmony-infer-chs-math-1 | ✅ SUCCESS | >>>>> | |
| UT_Test | ✅ SUCCESS | ||
| UT_Test_experimental | ✅ SUCCESS | ||
| UT_Test_kernel | ✅ SUCCESS | ||
| PreSmoke_A900 | ✅ SUCCESS | >>>>> | |
| API_Check | ✅ SUCCESS | >>>>> | |
| PreSmoke_ATK_Test_A2 | ✅ SUCCESS | >>>>> |
[2026-06-30 17:37:02] CI执行结束


6月30日 修改了pull request 的描述
CANN-robot
6月30日 评论:
6月30日 评论:
流水线任务触发成功
任务链接 [194e68b876574b9c935b02aeddb04c8e][流水线指导]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| antipoison | ✅ SUCCESS | >>>>> | |
| codecheck_Pr | ✅ SUCCESS | ||
| StaticCheck_codespell_check | ✅ SUCCESS | ||
| StaticCheck_link_validity_check | ✅ SUCCESS | ||
| StaticCheck_resource_existence_check | ✅ SUCCESS | ||
| StaticCheck_tag_closed_check | ✅ SUCCESS | ||
| StaticCheck_markdownlint | ✅ SUCCESS | ||
| codecheck_codestyle | ⚠️ WARNING | >>>>> | |
| codecheck_precommit | ⚠️ WARNING | >>>>> | >>>>> |
[2026-06-30 17:30:37] CI执行结束


songkai111
6月30日 评论:
6月30日 评论:
/lgtm
/approve


6月30日 添加了label:approved
6月30日 添加了label:api-check-pass
6月30日 删除了label:ci-pipeline-running
6月30日 添加了label:ci-pipeline-passed
zhanw_coding
6月30日 评论:
6月30日 评论:
/lgtm
/approve


6月30日 添加了label:lgtm
6月30日 合入了pull request
描述
关联的Issue
https://gitcode.com/cann/ops-math/issues/1961
测试
文档更新
类型标签