已合并
fix torch.stft bug on ouput shape when input is empty tensor #5332
XianglongZeng创建于 7月1日
fix torch.stft bug on ouput shape when input is empty tensor #5332
已合并
XianglongZeng创建于 7月1日
XianglongZeng成员
7月1日
# 【合入来源】 > **如有社区issue,请关联issue链接**\ > **请勿携带内部流程信息(需求链接、问题单、内部issue等)** - [ ] 需求 - [x] 问题单 - [ ] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 此前torch.stft在 get_output_size 中,使用 batch > 0 来判定是否在输出形状中包含 batch 维度,若batch = 0则舍弃batch维,导致空tensor输入场景下和标杆的输出shape不对齐,改为空tensor下绕过算子调用,直接返回shape正确的空tensor输出 # 【资料变更】 不涉及 # 【接口变更】 不涉及 # 【功能验证】 atk用例: ![image.png](https://raw.gitcode.com/user-images/assets/7403085/781f449a-604a-4991-88a8-594a27b2a083/image.png 'image.png') ut用例: ![image.png](https://raw.gitcode.com/user-images/assets/7403085/d2f18a1f-6ba1-4727-a790-03231312467a/image.png 'image.png') # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [ ] 代码注释完备,正确记录错误日志 - [ ] 代码实现进行了返回值、空指针等校验 - [ ] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [ ] PR持续集成流水线(CI)执行通过,代码检查无异常
likedislike
Pull Request已成功合入, 合并人@ascend-robot
(感谢 XianglongZeng 的贡献)
XXianglongZeng成员
7月1日 创建了 pull request,commit 9b4ea102
ascend-robotascend-robot成员
7月1日 添加了label:ascend-cla/yes
ascend-robot
ascend-robot成员
7月1日 评论:

CLA Signature Pass

probiotics_53, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
ascend-robotascend-robot成员
7月1日 添加了label:needs-issue
此处折叠了131条消息 查看更多
XXianglongZeng成员
7月2日 关联了issue:[Bug]: torch.stft在空tensor场景下npu输出shape和标杆不一致
ascend-robotascend-robot成员
7月2日 删除了label:needs-issue
htchu成员
7月2日 评论:

/approve

likedislike
ascend-robotascend-robot成员
7月2日 添加了label:lgtm
ascend-robotascend-robot成员
7月2日 合入了pull request