You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册。
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR addresses bug fixes in the meta inference implementations and the unfold operator by introducing a fallback mechanism for symbolic variables and correcting incorrect arithmetic in the unfold infermeta. Key changes include:
Updating the error handling in paddle.nn.functional.unfold to use a more specific exception.
Refactoring the symbolic meta inference flow in the function graph executor to include a fallback to constant symbolic variables.
Fixing the computation of output channels in the unfold infermeta logic when the channel dimension is negative.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File
Description
python/paddle/nn/functional/common.py
Changed exception type for invalid paddings to NotSupportedTensorArgumentError.
[nitpick] Consider correcting the error message grammar by replacing 'encount' with 'encountered'.
f"InferMeta encount {type(err)}, but all args are not symbolic."
paddle/phi/infermeta/unary.cc:5586
Consider adding a comment to clarify that when in_dims[1] is negative, -1 is returned to indicate a fallback behavior for unsupported dynamic dimensions.
SigureMo
changed the title
[SOT][DynamicShape][PHI] Fallback symbolic variable until success when infermeta and fix unfold infermeta
[SOT][DynamicShape][PHI][3.13] Fallback symbolic variable until success when infermeta and fix unfold infermeta
May 14, 2025
SigureMo
changed the title
[SOT][DynamicShape][PHI][3.13] Fallback symbolic variable until success when infermeta and fix unfold infermeta
[SOT][DynamicShape][PHI] Fallback symbolic variable until success when infermeta and fix unfold infermeta
May 15, 2025
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Category
Execute Infrastructure
PR Types
Bug fixes
Description
当 infermeta 会有多个不支持动态 dim 的参数时,会依次尝试 fallback,直到所有不支持的参数都 fallback 为止
另外修复了
paddle.nn.functional.unfold
infermeta 在包含 -1 时候错误运算的问题(in_dims[1]=-1, kernel_sizes[0]=3, kernel_sizes[1]=3
算出来-9
),前序 PR #72522(unfold 问题真多)