[CINN] Fix bug of substituting dim expr for group #62941
Merged
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 types
Bug fixes
PR changes
Others
Description
Pcard-67164
问题描述:
目前Group的输入Value维度符号为复合符号(如 S0+S1)时,会自动替换为新的简单符号表示(如S10)。但当输入Value的维度符号既有S0,S1 同时也有Broadcast(S0, S1),此时如果将Broadcast(S0, S1)替换为新符号的话会丢失掉与S0,S1的广播约束信息,对于此类情况Broadcast(S0, S1)是不需要替换为新符号的。
修复方案:
本PR中增加了对输入Value维度替换复合符号的过滤处理,当一个复合符号的所有基础符号都能在其他输入Value的维度符号中找到时,将不会对这样的复合符号进行替换。