Fix TransformLocalIndicesToIters corner case.#73929
Merged
zyfncg merged 1 commit intoPaddlePaddle:developfrom Jul 17, 2025
Merged
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
lshpku
reviewed
Jul 9, 2025
lshpku
reviewed
Jul 9, 2025
lshpku
reviewed
Jul 9, 2025
16798f8 to
e0fd7ee
Compare
e0fd7ee to
27548a2
Compare
27548a2 to
8038daf
Compare
lshpku
approved these changes
Jul 16, 2025
test/cpp/pir/cinn/eliminate_common_factor_of_local_index_test.cc
Outdated
Show resolved
Hide resolved
zyfncg
approved these changes
Jul 16, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
CINN
PR Types
Bug fixes
Description
修复BUG1:CINN TransformLocalIndicesToIters Pass修改
TransformLocalIndicesToIters支持的普遍场景如下:
当IndiceFunc是[Add Sub Mul Div Mod]的组合, Local_var可以被化简为Local_var[i][j][k]
具体的例子:
但是存在Corner Case
Local_var[(i + 1024)/2048],i取值范围[0,16),
那么Local_var[(i + 1024)/2048]应该被化简为Local_var[0],而不是Local_var[i]。
化简成Local_var[i]会生成越界的访问。
修复BUG2:CINN LoopTransformation Pass修改
Slip轴生成新temp_var的时候没有配置新Var的upper_bound和lower_bound
Pcard-90680