已合并
解决stft超大shape int32溢出问题 #2096
east_yang创建于 4月7日
解决stft超大shape int32溢出问题 #2096
已合并
east_yang创建于 4月7日
east_yang成员
4月7日

描述

关联的Issue

测试

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 east_yang 的贡献)
Eeast_yang成员
4月7日 创建了 pull request,commit e484a35a
east_yang成员
4月7日 评论:

compile

likedislike
Eeast_yang成员
4月7日 推送  1 个提交:13a7dc43-fix bug
Eeast_yang成员
4月7日 update merge request[project id: 7649531, iid: 2096, commit_id: dc3dcca60f83bad763b1c7ccb757727399e87dab] virtual merging success
CANN-robot
CANN-robot成员
4月7日 评论:

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
math/stft zhajianqing123, luowen203_gg123 (2/2) zhajianqing123 (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

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

likedislike
CANN-robotCANN-robot成员
4月7日 添加了label:cann-cla/yes
CANN-robotCANN-robot成员
4月7日 将FelixTang7,zhou-qilong,wangrui_,renruhai,zhajianqing123,rxtfeng,luowen203_gg123,loov1,zhangzijie,songkai111,zhangyuxiang0119,demoauguste,llimwang,gubaocheng设为评审人
CANN-robotCANN-robot成员
4月7日 将FelixTang7,zhou-qilong,wangrui_,renruhai,zhajianqing123,rxtfeng,luowen203_gg123,loov1,songkai111,zhangyuxiang0119,demoauguste,llimwang,gubaocheng设为审查人
east_yang成员
4月7日 评论:

/check-pr

likedislike
CANN-robotCANN-robot成员
4月7日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
4月7日 评论:

流水线任务触发成功
任务链接 [fb1bd467abe24d83bfb2efd428907f7c][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_mobile_station ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_experimental ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_single ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_X86_A5 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_A5 ✅ SUCCESS >>>>> >>>>>
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 >>>>>
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_ARM_monitor ✅ SUCCESS >>>>> >>>>>
UT_Test ✅ SUCCESS
UT_Test_experimental ✅ SUCCESS
UT_Test_kernel ✅ SUCCESS
Smoke_A900_npupool ✅ SUCCESS >>>>>
API_Check ✅ SUCCESS >>>>>
ATK_Test_A2 ✅ SUCCESS

[2026-04-07 16:02:49]    CI执行结束

likedislike
CANN-robot
CANN-robot成员
4月7日 评论:

问题/功能描述

修复STFT算子分片计算中存在的变量类型不匹配问题。原代码多处使用int32_t类型变量存储ge::GetSizeByDataType函数返回的uint32_t类型数据,并在日志打印时使用%d格式符,可能导致编译器警告或数据截断。本次修改旨在消除这些类型安全隐患,提升代码的健壮性和规范性。

修改方案描述

STFTGeneralizedTiling类中多个成员函数(如SplitCoresOnNSplitCores等)内的typeSize变量类型从int32_t统一改为uint32_t,以匹配上游函数的返回值类型,并同步将相关日志的格式符从%d修正为%u。对于GetWorkspaceSize函数中涉及较大尺寸计算的情况,将typeSize类型提升为uint64_t,日志格式符相应改为%lu。此方案通过统一类型和修正格式符,确保了类型安全,消除了潜在的未定义行为风险。

likedislike
CANN-robot
CANN-robot成员
4月7日 评论:

The following labels are not ready.

lgtm: Please wait for reviewers to review the code.

approved: Please wait for committers to review the code.

ci-pipeline-passed: Please wait for the CI test to be completed.

likedislike
CANN-robot
CANN-robot成员
4月7日 评论:

流水线任务触发成功
任务链接 [27201dce96f34f779bde2617a500915f][流水线指导]

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
anti_virus ✅ SUCCESS >>>>>
Check_Pr ✅ SUCCESS >>>>>
StaticCheck_codespell_check ✅ SUCCESS
StaticCheck_link_validity_check ✅ SUCCESS
StaticCheck_resource_existence_check ✅ SUCCESS
StaticCheck_tag_closed_check ✅ SUCCESS
StaticCheck_markdownlint ✅ SUCCESS
cocheck_codestyle ✅ SUCCESS

[2026-04-07 15:55:45]    CI执行结束

likedislike
CANN-robotCANN-robot成员
4月7日 添加了label:api-check-pass
CANN-robotCANN-robot成员
4月7日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
4月7日 添加了label:ci-pipeline-passed
zhajianqing123成员
4月7日 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
4月7日 添加了label:approved
luowen203_gg123成员
4月7日 评论:

/lgtm

likedislike
east_yang成员
4月7日 评论:

/check-pr

likedislike
CANN-robotCANN-robot成员
4月7日 添加了label:lgtm
CANN-robot
CANN-robot成员
4月7日 评论:

Review Guide

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

likedislike
CANN-robotCANN-robot成员
4月7日 合入了pull request